Re: [IAEP] Restoring journals on newer versions of Sugar

2011-06-01 Thread Bernie Innocenti
On Wed, 2011-06-01 at 17:07 +0200, Christoph Derndorfer wrote:

> Just for the record, the process would be
> 
> 
> (1) to tar the Journal on every XO
> (2) copy it over to a USB drive
> (3) reflash the XOs
> (4) untar the Journal backup from the USB drive back
> to ~/.sugar/default/datastore
>
> Right?

> The main reason why I'm asking is that I seem to remember Martin
> Langhoff at some point mentioning that restoring the Journal while
> Sugar was running could prove to be an issue. (Unfortunately I can't
> find the thread in question at the moment.)

Indeed, on restore, the datastore could mess up the index while you're
still unpacking the tarball. You need to insert these extra steps:

 (3b) killall datastore
 (5) restart Sugar (ctrl-alt-backspace saves time)

Another clever possibility is deleting the index_clean flag from the
datastore directory just before step (5)... This will force the
datastore to reindex everything the next time, which helps recover files
lost due to bugs in older versions of the datastore.

In Dextrose we also added a "Repair Journal" function which lets the
user force an index rebuild. It's crude, but we couldn't be 100% sure
that we had caught all the odd ways in which journal objects could go
lost when the filesystem fills up or due to crashes.

-- 
Bernie Innocenti
Sugar Labs Infrastructure Team
http://wiki.sugarlabs.org/go/Infrastructure_Team


___
IAEP -- It's An Education Project (not a laptop project!)
IAEP@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/iaep


[IAEP] Restoring journals on newer versions of Sugar

2011-06-01 Thread Bernie Innocenti
Answering your question on IRC:

  hi all
  I've got a question related to Journal backup/restore: is
  it realistically possible to get Journal entries created on 8.2 to
  11.1.2 with the help of dsd_'s scripts or other ways?

Yes. If you make a tarball from the contents of
~/.sugar/default/datastore created on an older Sugar release, then
unpack it in the same location on a newer release, the datastore will
automatically upgrade it to the current format.

In fact, the jorunal backup/restore GUI in Dextrose [1] is a distant
cousin of Daniel Drake's scripts. It also performs backups/restores to
the schoolserver using rsync, which is what most users do across
upgrades.

Getting all the little details right wasn't easy, we had to do a lot of
testing in various scenarios, and there are still a few corner cases
that we haven't taken care of. For example, if the next version of the
OS grows bigger, restoring a very large datastore would fail.

The next step would be allowing users to browse remote datastores on the
schoolserver and restore individual files. This isn't as hard as it may
sound, because the on-disk format of the schoolserver is just an rsync
of a regular datastore, and the user has full ssh access to it, so it
would be easy to access it with FISH [2].

[1] http://wiki.sugarlabs.org/go/Features/Backup_and_Restore
[2] http://en.wikipedia.org/wiki/Files_transferred_over_shell_protocol

-- 
Bernie Innocenti
Sugar Labs Infrastructure Team
http://wiki.sugarlabs.org/go/Infrastructure_Team


___
IAEP -- It's An Education Project (not a laptop project!)
IAEP@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/iaep