Re: [Server-devel] Backup and Recovery

2009-11-12 Thread Martin Langhoff
On Wed, Nov 11, 2009 at 11:43 AM, Martin Langhoff
martin.langh...@gmail.com wrote:
 It will work better in the Journal interaction, but the contents of
 the document will fail to be loaded in the Activity because a bug on
 the Moodle side -- see  http://dev.laptop.org/ticket/9602 for more
 info.

Right - it took a while to diagnose the problem. See updates (and a
patch you can apply to your SoaS builds) on
http://dev.laptop.org/ticket/9651 and
http://dev.sugarlabs.org/ticket/1553

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
server-de...@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-11 Thread Martin Langhoff
On Wed, Nov 11, 2009 at 11:33 AM, Hamilton Chua hamilton.c...@gmail.com wrote:
 I'm going to grab the patch from http://bugs.sugarlabs.org/ticket/1098
 and test it out on SoaS.

It will work better in the Journal interaction, but the contents of
the document will fail to be loaded in the Activity because a bug on
the Moodle side -- see  http://dev.laptop.org/ticket/9602 for more
info.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-11 Thread Hamilton Chua
Martin,

Thanks so much. Yes these are the files that I get on restore from my
tests.

This suggests that we may need to update our XS too.

I'm going to grab the patch from http://bugs.sugarlabs.org/ticket/1098
and test it out on SoaS.

I'll keep you posted on results.

Thanks again for working on this.

Best,

Hamilton


On Tue, 2009-11-10 at 14:03 +0100, Martin Langhoff wrote:
 On Fri, Nov 6, 2009 at 1:41 PM, Hamilton Chua hamilton.c...@gmail.com wrote:
  Please allow me, you can download a sample of the downloaded backup
  journal from
 
  http://www.solutiongrove.com/backup-journal-sample.tar.bz2
 
 Note that the xoj files don't look like that at all. I think you've
 tarred up the files showing the bad results.
 
 I've uploaded 2 sample .xoj files, on a server config'd to serve them
 correctly. One is a backup from an OS 802 machine, the other from a
 recent F11/Sugar 0.84.2 build. Both created by the Moodle included in
 XS-0.6, based on the backups from each machine.
 
 Files at http://dev.laptop.org/~martin/sample_journal_entry_bundles --
 you can see the server is serving them right with:
 
   $ GET -Sed 
 http://dev.laptop.org/~martin/sample_journal_entry_bundles/AB-f11.xoj
   ...
   Content-Type: application/vnd.olpc-journal-entry
 
 There is a little difference in the metadata between the two files --
 the mimetype in the metadata has an improper escape, probably an
 unrelated bug.
 
 cheers,
 
 
 
 m

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-11 Thread Hamilton Chua
Thanks Martin. 

On Wed, 2009-11-11 at 11:43 +0100, Martin Langhoff wrote:
 On Wed, Nov 11, 2009 at 11:33 AM, Hamilton Chua hamilton.c...@gmail.com 
 wrote:
  I'm going to grab the patch from http://bugs.sugarlabs.org/ticket/1098
  and test it out on SoaS.
 
 It will work better in the Journal interaction, but the contents of
 the document will fail to be loaded in the Activity because a bug on
 the Moodle side -- see  http://dev.laptop.org/ticket/9602 for more
 info.
 
 cheers,
 
 
 
 m

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-10 Thread Martin Langhoff
On Fri, Nov 6, 2009 at 1:41 PM, Hamilton Chua hamilton.c...@gmail.com wrote:
 Please allow me, you can download a sample of the downloaded backup
 journal from

 http://www.solutiongrove.com/backup-journal-sample.tar.bz2

Note that the xoj files don't look like that at all. I think you've
tarred up the files showing the bad results.

I've uploaded 2 sample .xoj files, on a server config'd to serve them
correctly. One is a backup from an OS 802 machine, the other from a
recent F11/Sugar 0.84.2 build. Both created by the Moodle included in
XS-0.6, based on the backups from each machine.

Files at http://dev.laptop.org/~martin/sample_journal_entry_bundles --
you can see the server is serving them right with:

  $ GET -Sed 
http://dev.laptop.org/~martin/sample_journal_entry_bundles/AB-f11.xoj
  ...
  Content-Type: application/vnd.olpc-journal-entry

There is a little difference in the metadata between the two files --
the mimetype in the metadata has an improper escape, probably an
unrelated bug.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-03 Thread Martin Langhoff
On Tue, Nov 3, 2009 at 3:01 PM, Hamilton Chua hamilton.c...@gmail.com wrote:
 Thanks for the confirmation. I am in the process of debugging. The only
 change that made it get that far was to the journalentrybundle.py file.

Ok - that sounds like the right place to be hacking in ;-)

 Adding the get_bundle_id def (it just returns  None btw) allowed it to
 go a step further and unzip the backup file.

But get_bundle_id is a method that returns the id as defined in the
metadata. Maybe that should come from an inherited class? We
definitely need the eyes of someone who understands that code (Tomeu?)

 However, please see the new error I am getting below. It deflates the
 backup file but right after that it errors out complaining about a
 missing __zip_file.

 I noticed that it assumes the files extracted from the backup data is an
 ActivityBundle. Is that correct ?

No idea -- I am not familiar with the code that appears in the stacktrace...

 I'm tempted to just upgrade sugar to 0.86 but there might be those still
 using strawberry who are reluctant to upgrade but would like to get
 backup and restore working for strawberry, so finding exactly what to
 change/fix on strawberry might be useful.

Definitely useful -- as I need this to work on 0.84 for the new
F11-based builds!

cheers,


m

 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

 *

 On Mon, 2009-11-02 at 16:47 +0100, Martin Langhoff wrote:
 On Mon, Nov 2, 2009 at 4:43 AM, Hamilton Chua hamilton.c...@gmail.com 
 wrote:
  I have backported the changes to the strawberry release and restore
  seems to be working now.

 Good to hear you've narrowed it down. I'll probably have to apply
 similar patches on the OLPC F11 Sugar :-)

  4) Browse downloads the file and puts it in the Journal
  5) I click Show in Journal
  6) I see the Activity+Backup file details.
  7) Click back to journal

 That's weird. On the 8.2.1 XO OS release, the process is skips step
 67. The downloading message in Browse.xo does mention
 Activity+Backup (I tweaked the apparent filename that browse
 downloads to get that msg), but after that the Journal has only added
 the entry you want.

  Is the above how more or less restore should work or behave ? I was sort
  of expecting the  Activity+Backup file to be replaced by the restored
  data in the Journal.

 Your expectations are right, and I think you are seeing another bug in
 the Browse.xo - Journal interop.

 cheers,


 m





-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
server-de...@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-03 Thread Hamilton Chua
Martin,

Thanks for the confirmation. I am in the process of debugging. The only
change that made it get that far was to the journalentrybundle.py file.

Adding the get_bundle_id def (it just returns  None btw) allowed it to
go a step further and unzip the backup file.

However, please see the new error I am getting below. It deflates the
backup file but right after that it errors out complaining about a
missing __zip_file.

I noticed that it assumes the files extracted from the backup data is an
ActivityBundle. Is that correct ?

I'm tempted to just upgrade sugar to 0.86 but there might be those still
using strawberry who are reluctant to upgrade but would like to get
backup and restore working for strawberry, so finding exactly what to
change/fix on strawberry might be useful.

*

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

*

On Mon, 2009-11-02 at 16:47 +0100, Martin Langhoff wrote:
 On Mon, Nov 2, 2009 at 4:43 AM, Hamilton Chua hamilton.c...@gmail.com wrote:
  I have backported the changes to the strawberry release and restore
  seems to be working now.
 
 Good to hear you've narrowed it down. I'll probably have to apply
 similar patches on the OLPC F11 Sugar :-)
 
  4) Browse downloads the file and puts it in the Journal
  5) I click Show in Journal
  6) I see the Activity+Backup file details.
  7) Click back to journal
 
 That's weird. On the 8.2.1 XO OS release, the process is skips step
 67. The downloading message in Browse.xo does mention
 Activity+Backup (I tweaked the apparent filename that browse
 downloads to get that msg), but after that the Journal has only added
 the entry you want.
 
  Is the above how more or less restore should work or behave ? I was sort
  of expecting the  Activity+Backup file to be replaced by the restored
  data in the Journal.
 
 Your expectations are right, and I think you are seeing another bug in
 the Browse.xo - Journal interop.
 
 cheers,
 
 
 m

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-02 Thread Martin Langhoff
On Mon, Nov 2, 2009 at 4:43 AM, Hamilton Chua hamilton.c...@gmail.com wrote:
 I have backported the changes to the strawberry release and restore
 seems to be working now.

Good to hear you've narrowed it down. I'll probably have to apply
similar patches on the OLPC F11 Sugar :-)

 4) Browse downloads the file and puts it in the Journal
 5) I click Show in Journal
 6) I see the Activity+Backup file details.
 7) Click back to journal

That's weird. On the 8.2.1 XO OS release, the process is skips step
67. The downloading message in Browse.xo does mention
Activity+Backup (I tweaked the apparent filename that browse
downloads to get that msg), but after that the Journal has only added
the entry you want.

 Is the above how more or less restore should work or behave ? I was sort
 of expecting the  Activity+Backup file to be replaced by the restored
 data in the Journal.

Your expectations are right, and I think you are seeing another bug in
the Browse.xo - Journal interop.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-11-01 Thread Hamilton Chua
Martin,

Thanks so much for the replies.  I have found the problem. I was
creating the spins based on the strawberry release. It seems there were
a few changes in the journalentrybundle python script since then that
allows restore to work.

I have backported the changes to the strawberry release and restore
seems to be working now. 

However, I would like to ask how the work flow goes for restoring data.

Here's how I do it :

1) boot SoaS
2) open the Browse Activity and go to the Backups tab in my moodle
page
3) click on the link of a backup I want to restore
4) Browse downloads the file and puts it in the Journal
5) I click Show in Journal
6) I see the Activity+Backup file details.
7) Click back to journal

Now in the Journal, right below the Activity+Backup file entry in the,
I see the data that was restored.

Is the above how more or less restore should work or behave ? I was sort
of expecting the  Activity+Backup file to be replaced by the restored
data in the Journal.

Thanks again.

Best,

Hamilton


On Fri, 2009-10-30 at 10:43 +0100, Martin Langhoff wrote:
 On Fri, Oct 30, 2009 at 1:08 AM, Hamilton Chua hamilton.c...@gmail.com 
 wrote:
  After turning on verbose debugging in the logs and tailing them during
  an attempted restore.
 
  I noticed a series of errors that ended with
 
  AttributeError: JournalEntryBundle object has no attribute
  'get_bundle_id'
 
 Hmmm. Weird. get_bundle_id sounds a lot like a method, not an
 attribute. See 
 http://www.google.es/search?hl=enq=get_bundle_id+site%3Aapi.sugarlabs.org
 
 In other words -- sounds strongly like a bug somewhere between Browse  
 Journal
 
 
  It occurs when the file has been placed in the journal. The journal
  checks if it's an activity or content bundle.
 
 Then there's a typo / thinko on the Journal code.
 
  file, I noticed that the activity and activity_id files are empty and
  the mime_type says it is application/vnd.olpc-journal-entry. Does this
  sound right ?
 
 Yes, and no. It's a good indication that my diagnosis above is right.
 Browse has received the right thing from Moodle, but when the Journal
 is asked to store an application/vnd.olpc-journal-entry it should
 unpack it and store its contents instead...
 
 cheers,
 
 
 
 m

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-10-29 Thread Hamilton Chua
Martin,

After turning on verbose debugging in the logs and tailing them during
an attempted restore.

I noticed a series of errors that ended with

AttributeError: JournalEntryBundle object has no attribute
'get_bundle_id'

I don't believe it's browse as it seems to be doing the right thing. I
tried uninstalling the rpm and installing from activities.sugarlabs.org
and got the same results.

It occurs when the file has been placed in the journal. The journal
checks if it's an activity or content bundle.

When checking the metadata for the journal entry created for the backup
file, I noticed that the activity and activity_id files are empty and
the mime_type says it is application/vnd.olpc-journal-entry. Does this
sound right ?


Thanks,

Hamilton







On Tue, 2009-10-27 at 17:27 +0100, Martin Langhoff wrote:
 On Tue, Oct 27, 2009 at 5:05 PM, Hamilton Chua hamilton.c...@gmail.com 
 wrote:
  The metadata for the journal is application/vnd.olpc-journal-entry as
  per its metadata. I'll do a packet capture as you suggested and I'll
  check the apache server logs too for clues.
 
 Then you can probably skip the packet capture. The problem is
 somewhere between Browse.xo and the Journal.
 
 The Journal should never store a file that gets downloaded by Browse
 with application/vnd.olpc-journal-entry; instead it should unpack it
 and import it, reading its metadata.
 
 cheers,
 
 
 m

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-10-27 Thread Hamilton Chua
Hi Martin,

We are using XS v 06d5, Sugar 0.84 and the ds-backup rpm from
http://dev.laptop.org/~martin/public_rpms/joyride/ds-backup-client-0.8.1-1.olpc3.noarch.rpm

All modifications are in the latest patches in 
http://dev.sugarlabs.org/ticket/1124

I'm in the process of debugging the problem. It's either when backup is
made or when the restore file is downloaded. I have inspected the files
in /library/users in the XS and it look like the metdata is properly
created. 

Best,

Hamilton




On Tue, 2009-10-27 at 11:02 +0100, Martin Langhoff wrote:
 On Mon, Oct 26, 2009 at 10:27 PM, Caroline Meeks
 carol...@solutiongrove.com wrote:
  Backup is now working for us but when I try to recover files by clicking on
 
 Hi Caroline!
 
 You are a bit of a moving target, I don't know what XS you are using,
 or what Sugar you are using. And which ds-backup you are using, with
 which of Hamilton's many versions of the fixup paches (vanilla Sugar
 would normally not have backup).
 
 So... I dunno! You probably need to do a bit of debugging yourself to
 diagnose the situation.
 
  them in Moodle they are not showing up in Sugar with the right file type to
  be used again.  They show up as File Activity + Backup and I can't open
 
 That sounds _very_ wrong. Moodle should be serving the backups with a
 special mimetype that Sugar recognizes as a Journal Entry Bundle -- so
 the Journal unpacks it and imports it (hence showing the right name,
 and type).
 
  For XOs can you download files and use them again on a new XO?
 
 Yes. I hate to say it, but it works for me.
 
 
 m

___
Server-devel mailing list
server-de...@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-10-27 Thread Hamilton Chua
Hi Martin,

I have more info. 

As I mentioned earlier, I verified that the backed up files have the
right metadata.

I now checked the datastore on my local sugar install. I looked for the
downloaded file. 

I see that it is a journal entry with a data file and a metadata
directory. I can unzip the data file to get to the backed up files and
it has the correct metadata.

I think the problem is that the journal doesn't recognize it as a zip
file and does not unzip it. 

I don't know enough about how this works yet so I wanted to ask, what
tells the Journal to recognize the download as a backup file that should
be restored (or unzipped). 

Can I get a sample of the metadata directory of a downloaded backup
file ?

Thanks in advance,

Hamilton


On Tue, 2009-10-27 at 19:29 +0800, Hamilton Chua wrote:
 Hi Martin,
 
 We are using XS v 06d5, Sugar 0.84 and the ds-backup rpm from
 http://dev.laptop.org/~martin/public_rpms/joyride/ds-backup-client-0.8.1-1.olpc3.noarch.rpm
 
 All modifications are in the latest patches in 
 http://dev.sugarlabs.org/ticket/1124
 
 I'm in the process of debugging the problem. It's either when backup is
 made or when the restore file is downloaded. I have inspected the files
 in /library/users in the XS and it look like the metdata is properly
 created. 
 
 Best,
 
 Hamilton
 
 
 
 
 On Tue, 2009-10-27 at 11:02 +0100, Martin Langhoff wrote:
  On Mon, Oct 26, 2009 at 10:27 PM, Caroline Meeks
  carol...@solutiongrove.com wrote:
   Backup is now working for us but when I try to recover files by clicking 
   on
  
  Hi Caroline!
  
  You are a bit of a moving target, I don't know what XS you are using,
  or what Sugar you are using. And which ds-backup you are using, with
  which of Hamilton's many versions of the fixup paches (vanilla Sugar
  would normally not have backup).
  
  So... I dunno! You probably need to do a bit of debugging yourself to
  diagnose the situation.
  
   them in Moodle they are not showing up in Sugar with the right file type 
   to
   be used again.  They show up as File Activity + Backup and I can't open
  
  That sounds _very_ wrong. Moodle should be serving the backups with a
  special mimetype that Sugar recognizes as a Journal Entry Bundle -- so
  the Journal unpacks it and imports it (hence showing the right name,
  and type).
  
   For XOs can you download files and use them again on a new XO?
  
  Yes. I hate to say it, but it works for me.
  
  
  m

___
Server-devel mailing list
server-de...@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-10-27 Thread Martin Langhoff
On Mon, Oct 26, 2009 at 10:27 PM, Caroline Meeks
carol...@solutiongrove.com wrote:
 Backup is now working for us but when I try to recover files by clicking on

Hi Caroline!

You are a bit of a moving target, I don't know what XS you are using,
or what Sugar you are using. And which ds-backup you are using, with
which of Hamilton's many versions of the fixup paches (vanilla Sugar
would normally not have backup).

So... I dunno! You probably need to do a bit of debugging yourself to
diagnose the situation.

 them in Moodle they are not showing up in Sugar with the right file type to
 be used again.  They show up as File Activity + Backup and I can't open

That sounds _very_ wrong. Moodle should be serving the backups with a
special mimetype that Sugar recognizes as a Journal Entry Bundle -- so
the Journal unpacks it and imports it (hence showing the right name,
and type).

 For XOs can you download files and use them again on a new XO?

Yes. I hate to say it, but it works for me.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-10-27 Thread Martin Langhoff
On Tue, Oct 27, 2009 at 3:31 PM, Hamilton Chua hamilton.c...@gmail.com wrote:
 I see that it is a journal entry with a data file and a metadata
 directory. I can unzip the data file to get to the backed up files and
 it has the correct metadata.

That sounds right.

 I think the problem is that the journal doesn't recognize it as a zip
 file and does not unzip it.

Two options there: moodle isn't serving it with the right mime-type
(application/vnd.olpc-journal-entry) or something is going amiss in
the Browse.xo-Journal handling of the file.

If you can do a packet capture of when you download the file, you
should be able to see the mimetype being sent...



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-10-27 Thread Hamilton Chua
Hi Martin,

 Two options there: moodle isn't serving it with the right mime-type
 (application/vnd.olpc-journal-entry) or something is going amiss in
 the Browse.xo-Journal handling of the file.
 
 If you can do a packet capture of when you download the file, you
 should be able to see the mimetype being sent...

The metadata for the journal is application/vnd.olpc-journal-entry as
per its metadata. I'll do a packet capture as you suggested and I'll
check the apache server logs too for clues.

Thanks very much for taking the time to look at the issue.

I'll report back as soon as I've found something.

Best,

Hamilton


___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Backup and Recovery

2009-10-27 Thread Martin Langhoff
On Tue, Oct 27, 2009 at 5:05 PM, Hamilton Chua hamilton.c...@gmail.com wrote:
 The metadata for the journal is application/vnd.olpc-journal-entry as
 per its metadata. I'll do a packet capture as you suggested and I'll
 check the apache server logs too for clues.

Then you can probably skip the packet capture. The problem is
somewhere between Browse.xo and the Journal.

The Journal should never store a file that gets downloaded by Browse
with application/vnd.olpc-journal-entry; instead it should unpack it
and import it, reading its metadata.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


[Server-devel] Backup and Recovery

2009-10-26 Thread Caroline Meeks
Backup is now working for us but when I try to recover files by clicking on
them in Moodle they are not showing up in Sugar with the right file type to
be used again.  They show up as File Activity + Backup and I can't open
them.  http://screencast.com/t/Pn2w8IoKy


 How is this supposed to work?

For XOs can you download files and use them again on a new XO?

Thanks,
Caroline



-- 
Caroline Meeks
Solution Grove
carol...@solutiongrove.com

617-500-3488 - Office
505-213-3268 - Fax
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel