HomeUserBackup

Revision 38 as of 2006-07-05 17:21:16

Clear message

Summary

This specification will discuss what's needed to take the the simple and concise backup application that was introduced in dapper, an make it a robust, finished solution that will be shipped in Edgy Eft. The system will use desktop notifications to make sure a user either backs up his data, or otherwise is aware of the consequences that may arise if he does not. The application described here can form the foundation for a more advanced and complete light dependency disaster recovery system.

Rationale

Providing an easy-to-use backup solution that's suitable for non-expert users is important. Expert users should install and/or use a more sophisticated backup system. Part of the aim is to tell the user exactly what she has to do, rather than leave it for her to think up a backup scheme, or take decisions herself about when/if to back up.

Use cases

  • John is a new Ubuntu user. He has been using his system for a week now, managed to sort everything out by means of getting his favorite theme set up and desktop behavior. He has also already got quite a few important email messages and some other bits of information currently stored on his Desktop. However, John is a newcomer to Ubuntu and is not aware of the fact he should do periodic backups. After using his machine for a week, a pop up dialog appears telling him "It has been a week since you installed your computer. In order to be able to restore it to the current state if data loss occurs, it's recommended that you do a backup. Would you like to do that now". Upon confirmation, he is presented with the home-user-backup tool GUI, so that he can carry out the backup procedure.
  • Rita wants to refresh the backup set she had previously created. Intuitvely, she reaches for her backup set and inserts the first backup cd. The home user restore program is then automatically fired up, offering her the option to restore her files, or to update the backup with new and changed files.
  • Marilize is an Ubuntu user who is worried about the safety of her data. Using her machine for 3 days now, she wishes to backup her data in order to be able to restore it in case it goes bad. She goes to "System" --> "Administration" --> "Backup Now". She is then instructed to insert CD media for storing the data backup. After confirming that she has inserted a CD into the drive, all her personal data is backed up to the removeable medium. When finished a pop up dialog instructs her "Please take out the CD, and label it 'Ubuntu Personal Backup data, dated 10-10-2006, 06:00am'".

  • Dan has been doing differential backups for some time now. To make sure new work he has done today will get backed up, he inserts his last differential backup cd. The system detects that a home user backup cd has been inserted into drive, and fires up the HomeUserBackup tool. It then scans for new and changed files, and makes sure there's enough free space on the medium to store the data. If not enough room is available, then home user backup system will suggest to Dan that it would probably be a good idea to make a new full backup now.

  • Norman just replaced his HD that went bad, and installed a new one. He wants to have his system settings and installed packages restored. After re-installing his system on the new hard drive, he inserts the first backup CD into drive. The system recognizes a backup cd, and offers to restore data from the backup archive. After confirming that Norman wants to restore, HomeUserBackup asks him to provide the first CD of the previously created backup, and likewise each of the subsequent volumes. The same process applies if Norman inserts a differential archive CD. At the end of the restore process his system is restored complete with all of his personal settings, bookmarks, home folder content and any packages he had installed prior to the HD loss.

Scope

This specification covers only backing up all the home directories on a given machine (i.e. data and settings files). Audiovisual content will be also backed up, unless it exceeds a non optical medium's capacity. As HomeUserBackup already supports multi-volume backups over CDs, audiovisual content will be backed up in that scenario by default.

The following are within the scope of this specification:

  • Backup to a user-specified path on the filesystem. (This could cater for non local medium backup if those are mounted and visible as part of the filesystem tree.)
  • Multi Volume Backups. (This already works with CDROMs in HomeUserBackup but needs improvement and possibly generalization for other media.)

  • Autorun capabilities. (Ie, the ability to launch a restore/update dialog in response to an inserted backup medium.)

Other system changes this spec involves:

  • Desktop notification framework - there are newly created python bindings for libnotify, which should be synced from debian once their packaging is done. see - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366863

  • SystemCleanUpTool (Low priority) - We should integrate this into the backup tool, such that before each backup we will call the system clean up tool to check if there is any redundent data that can be purged prior to the backup process.

The following are out of scope for this specification:

  • Data mirroring.
  • Doing backups to nonlocal media via network protocols. (eg. http, sftp etc.; In this context we need to consider possibility of using gnome-vfs.)
  • Backup scheduling algorithm. (For the next version; this will reduce user interaction with the program, which is good)
  • Backing up the list of installed packages. (Future feature)
  • Encryption. (Future feature)

Design

The backup functions will be available in the menus:

* Applications->Accessories->Backup to back up personal files

* System->Administration->System Backup to back up all personal files and selected system files - this requires administrative privileges

MattZimmerman: why two separate menu items?  the difference between them will not be obvious to the user.  better to have a single menu item which allows both system backup (if the user is in group admin) and user backup

The restore and incremental backup function is based on the mime-type and backup cd detection. Moving the incremental backups out of the main backup window allows us to tighten the workflow and to slim down the main window.

MattZimmerman: please explain "is based on the mime-type and backup cd detection"

Since a file inclusion/exclusion selector is out of scope for edgy we will provide a function to backup all files in home or to skip a predefined set of files: temporary files (browser caches, thumbnails), music (by file extension - mp3, ogg, etc.), videos (avi, wmv, wmf, etc) and perhaps trash. A third option will be to back up only a specified folder. We record the profile used in the metadata of the backup file.

MattZimmerman: we should never backup trash

After the backup is complete the user is notified that when in the future they wish to restore the data, or to update the backup with new and changed files, they should insert the cd (or double click on the file).

If the user inserts the cd or double clicks on a backup, a dialog will be shown offering the various facilities that are available: cancel; update with new and changed files; verify the backup; restoring the contents of the backup.

The restore window shows the content of the archive in a tree view. Furthermore it allows the user to select and unselect files and to restore to a defined root folder.

The system backup should be a low hanging fruit if the normal backup is implemented: We will provide an option to backup all home folders, files in /etc that are different from the ones that are in the corresponding package and a list of manually installed packages (this aptitude function will be hopefully in apt soon). For restore we extract the config files and try to reinstall the packages that were installed on the old system.

MattZimmerman: this is a complex feature and needs to be specified in more detail if it is to be implemented.  if not, it should be moved to a section describing future work.  I doubt it can be completed for Edgy.

Perhaps this can also be extended by a special backup profile for teachers in edubuntu.

Implementation

  • dar will be used for the backup creation
  • cdrecord for burning the cdroms MattZimmerman: isn't there a library for this?

  • add a mime type handler for your backup file - the extension is yet undecided MattZimmerman: should be decided

  • make use of hal hooks or eventually hermes for the cd autodetection (could be stolen from the install cd) - skipping this would not be a problem, since the cd is automounted and the user would have to click on the backup file that is on the cd MattZimmerman: needs more detail if it is in scope; if not, move to a future work section

  • for the system backup the python we use the dpkg mechanism to detect modified config files and the coming automatically/manual installed package database of apt MattZimmerman: syntax error at 'python'?  Should refer to the spec for auto-removal if that is what you mean here.  as above, system backup sounds like it is out of scope for this cycle

attachment:backup.png

attachment:file.png

attachment:progress.png

attachment:complete.png

attachment:handler.png

attachment:restore.png

attachment:conflict.png

attachment:backup-system.png

Code

attachment:hub-glatzor-UDSParis.glade

Data preservation and migration

  • Since dar file format remains mostly constant, and is always backward compatible, nothing to be done here.


CategorySpec