-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Backup feature try4 #276
Conversation
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
Add Backup and Restore classes. These classes implement backup and restore mechanisms to be used with external volumes, such as memory sticks. Add helpers functions to calculate pre-conditions such as available space, and datastore size. Comply with interfaces defined by Martin Abente and Gonzalo Odiard, for sugar upstream backup GUI. Comply with pep8. VERSION 2: Added volumes and checkpoints selection logic. Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
Options are displayed to the user if requested by the backend, and a progressbar is displayed while the backup/restore is done. The frontend and backend are separated to make easier create alternative implementations. A property is_cancellable is added to the SectionView, because the restore can't be cancelled, and need modify the toolbar buttons according to that. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
The file is named based in the xo serial number, or user name if is not available, and the date. The name is checked for invalid chars. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
The message is shown before the initial testing
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
@@ -52,6 +52,8 @@ data/icons/Makefile | |||
data/Makefile | |||
extensions/cpsection/aboutcomputer/Makefile | |||
extensions/cpsection/aboutme/Makefile | |||
extensions/cpsection/backup/Makefile | |||
extensions/cpsection/backup/backends/Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor thing: we should respect alphabetical order, and "backup" should come after "background"
@godiard could you link to the previous 3 tries, so I can read the comments in them? |
@@ -1,4 +1,4 @@ | |||
SUBDIRS = aboutme aboutcomputer background datetime frame keyboard language \ | |||
SUBDIRS = aboutme aboutcomputer backup background datetime frame keyboard language \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor, "backup" goes after "background"
@manuq, This is not longer needed, but is related: |
sugar_PYTHON = \ | ||
__init__.py \ | ||
view.py \ | ||
model.py \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor, there is a mix of tabs and spaces here.
ok @godiard these are my thoughts. i see it is much more polished than the previous try, and the code looks very clean, congrats! still i couldn't complete the test, because I couldn't restore. i think it was a good idea to try it on the xo :) I did backup two times, and the second overrides the first one, if this by design, I think is a good decision. I see it uses the machine serial number for filename.. what does it use for sugar without an xo? and one more question, I see other backends are planned.. is this considered in the current implemetation? the user will need to select a backup destination, or that will be handled automatically? or no plans yet? |
@manuq ,
I see, will check again. I don't know why you don't see the icons neither.
Is by design, in non xos, use the user name to create the file name: godiard@91423ed#diff-49cf7ea888825ecc1f54eef7fa67944eL87
Is considered. The current implementation ask to the user what backend use if more than one is present. |
@manuq , found why the icons were invisible in the xo. gtk-update-icon-cache /usr/share/icons/sugar/ |
Install mime type using sugar.xml