<div dir="ltr">Thanks Tony,<div><br></div><div style>I really am enjoying reading your code. Some tricks there that I'm learning from.</div><div style><br></div><div style>It seems to me that your retinking of ds-backup makes a wonderful addition to the ways we can think about ds-backup. I'd like to set up a github repo which starts from the current <a href="http://laptop.org">laptop.org</a> one, and then branches to all the different ways ds-backup can be expanded. Eventually, each branch could become it's own thing. It might be nice to incorporate an upgrade feature in ds-backup, so that when a specific school server is installed, and the XO's connect to it, the proper ds-backup behavior is substituted.</div>
<div style><br></div><div style>George</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 7, 2013 at 7:46 AM, Tony Anderson <span dir="ltr"><<a href="mailto:tony_anderson@usa.net" target="_blank">tony_anderson@usa.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have attached the ds_backup.py code. Tack on all disclaimers - it has not been tested in the XS-0.7 and 12.1.0 environment. It will need some revision to deal with the 'shared' XO environment in Lesotho so I will work on it while I am there.<br>
<br>
However, it really is not changed from XS-0.7 in areas that matter to you. The changes are in the way the Journal objects are handled. Martin Langhoff used rsync so that the backup is a snapshot of the local datastore. I am trying to establish the server-side as the real Journal with the local datastore containing only the currently relevant content. It seems sad that kids must delete their Journal because of the limited size of the local store. The message: Journal is full is not helpful, because the fact is that the store is full, often because of the excessive number of installed activities. With a school server, this is totally unnecessary since the Sugar Activities are available on the school server so that unused ones can be deleted on the XO.<br>
<br>
I had to move to mod_wsgi for Django (library). As far as I know, there is no change needed client-side. Apache needs to have wsgi installed (in XS-0.7 it is). Then all that is needed is a file in httpd/conf.d.<br>
I have also attached the one I am using.<div class="im"><br>
<br>
<br>
On 04/07/2013 06:04 AM, George Hunt wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
Hi Tony,<br>
<br>
I'm playing with ds-backup now, because one of the dependencies for<br>
ds-backup is mod_python which was dropped from fedora 18, in favor of<br>
mod_wsgi. It seems like a great time to rethink the issue.<br>
<br>
I cannot find the working code you mention in this email in my google<br>
stack. Can you send it to me again?<br>
<br>
I'm also talking with Tim Moody, about using puppet client as a way of<br>
pushing and modifying the configuration of XO's in the classroom. Do<br>
you have any experience, or ideas, about such a proposal? I'm not sure<br>
whether ds-backup might be used to introduce puppet client back into XOs.<br>
<br>
George<br>
<br>
On Sun, Dec 9, 2012 at 12:25 PM, Tony Anderson <<a href="mailto:tony_anderson@usa.net" target="_blank">tony_anderson@usa.net</a><br></div><div><div class="h5">
<mailto:<a href="mailto:tony_anderson@usa.net" target="_blank">tony_anderson@usa.net</a>><u></u>> wrote:<br>
<br>
Hi,<br>
<br>
I will send you the scripts as soon as I have a chance to try them<br>
on 12.0.1 and XS-0.7. Last year they were running on xs-0.6 and<br>
build 852 at Saint Jacob. There shouldn't be too much difference,<br>
although so far on most of the code I have been wrong by about 3 days!<br>
<br>
The identity problem really isn't that hard. A lot of the mailing<br>
list discussion seems related to running Sugar on something besides<br>
an XO.<br>
<br>
The user is identified on the server by the serial-number. For the<br>
backup, this is not a problem. The problem comes from <OLPC where an<br>
XO is shared. Then there needs to be something like a login to<br>
identify the actual user. There also needs to be separate Journals<br>
on the XO and separate backups on the school server.<br>
<br>
I should be able to give you working code within a week (I leave<br>
Kigali on 12/23 so it must be before then).<br>
<br>
Yours,<br>
<br>
Tony<br>
<br>
<br>
On 12/09/2012 04:11 PM, George Hunt wrote:<br>
<br>
Wow Tony,<br>
<br>
Your solution definitely needs to be part of the mix as we go<br>
forward.<br>
Can you send me copies of the scripts, or the changes you made to<br>
accomplish these objectives? If we are going to look at the<br>
serialnumber-user-identity issue, we might be making changes to<br>
the same<br>
packages.<br>
<br>
Have you worked through the changes needed to add user identity to<br>
journal backups? As Paul Fox was suggesting, I think there will<br>
be lots<br>
of ripple effects, if and when we start adding additional users, in<br>
addition to the user "olpc". Or maybe, someone will come up with a<br>
simplifying assumption, or approach.<br>
<br>
George<br>
<br>
<br>
<br>
On Sun, Dec 9, 2012 at 4:49 AM, Tony Anderson<br>
<<a href="mailto:tony_anderson@usa.net" target="_blank">tony_anderson@usa.net</a> <mailto:<a href="mailto:tony_anderson@usa.net" target="_blank">tony_anderson@usa.net</a>><br></div></div>
<mailto:<a href="mailto:tony_anderson@usa.net" target="_blank">tony_anderson@usa.net</a> <mailto:<a href="mailto:tony_anderson@usa.net" target="_blank">tony_anderson@usa.net</a>><u></u>>__><div><div class="h5">
<br>
wrote:<br>
<br>
Hi, Sameer<br>
<br>
I got an email from Nick Doiron re his visit to the Marshall<br>
Islands. He mentioned that you gave him a script to create<br>
a csv<br>
from the Journal backup.<br>
<br>
As I have mentioned several times on the list, I believe<br>
Martin's<br>
backup scheme while elegantly implemented is not adequate.<br>
His model<br>
is the traditional backup/restore.<br>
<br>
The problem, as always, is storage space. When an XO-1 is<br>
out of<br>
space, the user gets a message 'Journal is full'. The only<br>
practical<br>
solution often is to reflash the XO losing all of the Journal<br>
objects. If a user deletes an object from the Journal on<br>
the XO, the<br>
rsynch also removes it from the backup.<br>
<br>
I modified the scripts ds-backup.sh and ds-backup.py on the<br>
XO to<br>
use a different paradigm. The registration process creates two<br>
scripts in the /library/users/serial-number folder on the<br>
school<br>
server: journal and log. The backup script uploads the<br>
object to<br>
journal if there is an associated data file; otherwise, it is<br>
uploaded to the log folder and deleted from the local<br>
store. The<br>
remaining objects are marked as favorites in the Journal<br>
Activity to<br>
show that the data file is available on the XO. If the user<br>
clears<br>
the star, the data file is deleted from the datastore but<br>
remains on<br>
the school server. If the user fills a clear star, the<br>
backup script<br>
downloads the data file from the school server.<br>
<br>
At Saint Jacob, all of the laptops are 4gb XO-1.5 so I have<br>
not had<br>
to implement storage management. The plan would be to set<br>
limits on<br>
the size of the datastore and the /home/olpc/Activities<br>
folders. If<br>
a datastore outgrows the limit, data files can be deleted LRU.<br>
Similarly, activities can be deleted LRU. This way the user<br>
will not<br>
have to be involved. The user can always request a needed<br>
file to be<br>
restored to the local datastore and can request an activity be<br>
downloaded and installed from the school server repository.<br>
I expect<br>
this will be needed in Lesotho for XO-1.<br>
<br>
This method also supports restoring the users Journal after<br>
a reflash.<br>
It also enables a replacement laptop by renaming the<br>
serial-number<br>
folder on the school server (and updating the registration<br>
information).<br>
<br>
I am not sure if you are trying to implement this<br>
functionality, but<br>
it is important at a deployment.<br>
<br>
Yours,<br>
<br>
Tony<br>
<br>
<br>
<br>
<br>
</div></div></blockquote>
<br>
</blockquote></div><br></div>