[Server-devel] Backup and Recovery

Hamilton Chua hamilton.chua at gmail.com
Fri Nov 6 07:31:44 EST 2009


Hello Tomeu,

My apologies. Let me try to start from the beginning.

I am working on Sugar on a stick (SoaS) built on Sugar 0.84.2
(strawberry release)

Backup works fine but we encounter an issue when restoring. 

Restore works by going to the user's moodle page, clicking on the
"Backup" tab and clicking on the backup file to restore.

The expected behavior, and I think this is the case on 0.86 on the XO,
Browse should download the backup file and Journal extracts it such that
the backup file is removed from the journal and in its place would
appear the restored files.

Right now on Sugar 0.84.2, the downloaded backup file stays in the
journal and the journal does not unzip it to restore the backed up
files. 

I've been able to debug and fix to the extent that it extracts the files
from the backup but not remove the downloaded backup file from the
Journal. I was able to get that far by adding what seems to be a missing
def in journalbentrybundle.py, namely get_bundle_id but I am now seeing
a different problem as seen in the stacktrace, please see below.

Apparently 0.84.2 is missing some changes made in the succeeding
versions that allow restore to work.

I'm inclined to just use 0.86 but 0.84.2 is what is used in the
strawberry release and there might be users out there who want
backup/restore to work without upgrading to sugar to 0.86.

Hope this gets you up to speed. 

Best,

Hamilton

**********************
>> Archive:
 /home/liveuser/.sugar/default/data/8419a696-5a24-4595-aeda-7488e72605fa
> >>
> >> inflating: /tmp/83366588-d84b-4f00-acc1-3e5f32525540/83366588-d84b-4f00-acc1-3e5f32525540
> >>  inflating: /tmp/83366588-d84b-4f00-acc1-3e5f32525540/_metadata.json
> >> caution: excluded filename not matched:  mimetype
> >> <sugar.bundle.activitybundle.ActivityBundle object at 0x9e7ad6c>
> >> Traceback (most recent call last):
> >>  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 214,
> >> in maybe_handle_message
> >>    self._handler(*args, **kwargs)
> >>  File "/usr/lib/python2.6/site-packages/jarabe/journal/model.py", line
> >> 377, in _datastore_updated_cb
> >>    updated.send(None, object_id=object_id)
> >>  File "/usr/lib/python2.6/site-packages/sugar/dispatch/dispatcher.py",
> >> line 125, in send
> >>    response = receiver(signal=self, sender=sender, **named)
> >>  File
> >> "/usr/lib/python2.6/site-packages/jarabe/journal/journalactivity.py",
> >> line 250, in __model_updated_cb
> >>    self._check_for_bundle(kwargs['object_id'])
> >>  File
> >> "/usr/lib/python2.6/site-packages/jarabe/journal/journalactivity.py",
> >> line 283, in _check_for_bundle
> >>    registry.install(bundle)
> >>  File
> >> "/usr/lib/python2.6/site-packages/jarabe/model/bundleregistry.py", line
> >> 344, in install
> >>    elif not self.add_bundle(install_path):
> >>  File
> >> "/usr/lib/python2.6/site-packages/jarabe/model/bundleregistry.py", line
> >> 194, in add_bundle
> >>    bundle = self._add_bundle(bundle_path)
> >>  File
> >> "/usr/lib/python2.6/site-packages/jarabe/model/bundleregistry.py", line
> >> 208, in _add_bundle
> >>    bundle = ActivityBundle(bundle_path)
> >>  File
> >> "/usr/lib/python2.6/site-packages/sugar/bundle/activitybundle.py", line
> >> 51, in __init__
> >>    Bundle.__init__(self, path)
> >>  File "/usr/lib/python2.6/site-packages/sugar/bundle/bundle.py", line
> >> 65, in __init__
> >>    if os.path.isdir(self._path):
> >>  File "/usr/lib/python2.6/genericpath.py", line 41, in isdir
> >>    st = os.stat(s)
> >> TypeError: coercing to Unicode: need string or buffer, NoneType found
> >> Exception AttributeError: "'ActivityBundle' object has no attribute
> >> '_zip_file'" in <bound method ActivityBundle.__del__ of
> >> <sugar.bundle.activitybundle.Acti
> >> vityBundle object at 0x9e7ad6c>> ignored
******************




More information about the Server-devel mailing list