Summary

This specification discusses implementing a simple and concise backup solution for the non technical users. This application will be shipped with dapper, and be ready for use after installation. This application will make sure that a user either backs up his data, or otherwise is aware of the consequences that may arise if he does not.

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 rationale is to tell the user exactly what he has to do, rather than leave it for him to think up a backup schema.

Use Cases

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 the backup medium's capacity.

These are out of the scope of this specification:

Design

NOTE: All of this solution should be made with localization as a top priority and a ground level consideration, so it would be possible to translate and localize it.

One week after someone first logs in, a notification bubble appears in the corner of their screen, advertising the backup service.

notification.jpg

The main program shall be assisted by a gnome-panel applet, that would be responsible for delivering backup alerts and will allow the user to respond to them by firing the main backup program. The main program should not assume too much about the user's knowledge or understanding of a backup process, and thus assumes that a user follows its instructions accurately, not leaving anything for chance.

There will be an option to disable the notification and the feature altogether, to cater for large installations in which a sysadmin would like to take care of backing up machines' data by himself and not use the system. This will manifest in a debconf question at install time, such that it's also possible to preseed the question for mass installs:

attachment: backup3.png

Errata:

As suggested by the mentioned use cases, main program will follow a very focused and limited backup policy:

We will suggest to the user to use either one of his available media devices as a backup target.

Please note, that since this is essentially a user interface problem, most of my design will be around the UI elements and workflow we need to have for integrating such a solution into Ubuntu desktop.

User Interface

The first trigger to launching the backup wizard, will be set as a default of one week after the system has been installed. The notification will be delivered by the panel applet, which after clicking the applet notification ballon will open a dialog allowing the user to choose among the following options:

(dialog 1)

  +----------------------------------------------------------+
  | [X] Perform backup now. (Recommended)                    |
  | [ ] Remind me later.                                     |
  | [ ] Don't bother me again, I do not care about backups*  |
  |----------------------------------------------------------|
  |* This will leave you in a non recoverable state should   |
  |  your data be lost.                                      |
  |  It is highly recommended that you do continue with the  |
  |  backup.                                                 |
  +----------------------------------------------------------+

If the user chooses to not care about backups, the program exits. If he choses to perform the backup, the Ubuntu Personal Backup wizard will be fired up to continue backup proccess in detail. If the user chooses to be reminded later, we will set another 3 days as a default interval before the panel applet will remind him again to do the backup.

In the event of retriggering after a chosen interval has passed, the third option in dialog 1 will be replaced by:

|                                                |
| [ ] Open configuration and maintainance wizard |
|                                                |

This will enable the user to choose a different notification interval, if the current one being uncomfortable as the reason for not carrying on the backup at the notification time.

Main Workflow

When invoked (either by responding to an applet notification, or by the user itself), the program will detect for available media devices, if no media devices are detected, a proper message shall follow:

(window 1)

  +-----------------------------------------------------------------------------------------------------------------------+
  | No suitable backup devices were found.                                                                                |
  |                                                                                                                       |
  | I couldn't detect any suitable media devices that can be used for backups.                                            |
  | In order to be able to do backups, please consider installing a rewrite CD drive, or better get an external USB       |
  | hard drive. Do note that although CDRW is relatively cheap, an external hard drive will hold much more data and will  |
  | enable you to backup your media files if you have any.  After installing, rerun Ubuntu Personal Backup.               |
  |                                               [Quit and get some media devices]                                       |
  +-----------------------------------------------------------------------------------------------------------------------+

If at least one backup device was detected, ask the user if he just wants to do a complete dump of his current data, or possibly backup only files that have changed since the last backup:

+--------------------------------------------------------------------+
|   Please indicate of you would like to either:                     |
|                                                                    |
|   [X] Backup all current data to backup medium (erasing previous   |
|       snapshot if existent.)                                       |
|   [ ] Backup only what have changed since the last backup.         |
|                                                                    |
|                      [Continue]                                    |
+--------------------------------------------------------------------+

This will result in the backend program assembling the backup file according to the criteria chosen, gathering only the changes in the event the 2nd options was indicated, or just dumping all data into the backup file if the first option was chosen.

Moving on, we will offer the user to use the backup medium which is likely to store the biggest volume of data:

(window 2)

  +--------------------------------------------------------------+
  | Where would you like backup data to be stored?               |
  |                                                              |
  | [X] USB External Hard Drive. (Recommended)                   |
  | [ ] CD rewriteable drive.                                    |
  | [ ] USB Key.                                                 |
  |                                                              |
  +--------------------------------------------------------------+

After choosing the backup medium, the program will scan and estimate how big will the backup data be. Then it will check if the chosen backup medium is sufficiently big to contain the backup data. If not, the program will scan backup data again, excluding audiovisual content; this time, if the backup data without the audiovisual content can fit on the backup medium, it will provide a proper alert to the user. In addition, it will offer him to list the files that are considered audiovisual conten, so he will know what files are not being backed up in this run:

+---------------------------------------------------------------------+
|                                                                     |
| Your backup data is too big to fit on the backup medium. However,   |
| excluding audio visual content, it will fit on the medium.          |
|                                                                     |
| How would you like to proceed ?                                     |
|                                                                     |
| [ ] Remind me later after I've purchased a bigger backup medium.(3  |
|     days from now)                                                  |
| [X] Continue backup process, without backing up audiovisual content.|
| [ ] Cancel. I will think about it and run backup myself.            |
|                                                                     |
+---------------------------------------------------------------------+

If the user chooses the first option, we will remind him again in 3 days to redo the backup. If he chooses to Cancel, then we are going to remind the user to do a backup only on the next close daily/weekly/monthly interval as set in the configuration wizard. Other then that, he will have to run backup by himself if he wants something earlier to happen.

If user chose "Continue backup..." , an instructional window shall open asking the user to close currently open programs, and save any pending files that he is working on. This should allow consistency of the backed up data. After his confirmation, we start the backup process, presenting a progress window that also allows to interrrupt the process at any time:

(window 3)

  +-----------------------------------------------------------------------------------------------------------------------+
  | Backup in progress. Depending on the media choosen, and the size of data that needs to be backed up this can take     |
  |  from a couple of minutes to several hours. You can also choose to stop the backup process if you wish.               |
  |                                                                                                                       |
  |                                                                                                                       |
  |                  +--------------------------------------------------------------------------+                         |
  |                  |                                                                          |                         |
  |                  |                                                                          |                         |
  |                  |      [DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD=====================]    |                         |
  |                  |                                  66% Done.                               |                         |
  |                  |                                                                          |                         |
  |                  |           Processing file: /home/sivan/devel/hello_world.py                                                                                                              
  |                  |                                [ Interrupt ]                             |                         |
  |                  +--------------------------------------------------------------------------+                         |
  |                                                                                                                       |
  +-----------------------------------------------------------------------------------------------------------------------+

In the case of using a rewriteable media, the following dialog will pop up:

(window 4)

+---------------------------[Please follow instruction below]--------------------------+
| Backup process has finished succesfully. Please take the backup medium and put it in |
| a safe place. Make sure you can provide this same exact medium when restoring, so    | 
| it might be good to put it in a distinct place then other medium you have.           |
|                             [OK - I've done that, let's finish]                      |
+--------------------------------------------------------------------------------------+

If the backup was against a non rewriteable medium, then a numbering label will be suggested for the user that includes date, time of when the backup was performed. In any event, labeling the media is an additional assistive step offered to the user. So there will be sufficient metadata on the backup medium such that the restoration mechanism could figure up and do the right thing.

NOTE: Windows 1 through 4 also represent a restoration workflow, given these changes:

At this point , if the user hasn't yet set up a backup interval, the program will ask him to do so:

+---------------------------------------------------------------------------------+
| You haven't set up time to be reminded to do periodical backups, Please specify |
| your preferred interval:                                                        |
|                                                                                 |
| [X] Daily. (provides the best recoverability)                                   |
| [ ] Weekly                                                                      |
| [ ] Monthly                                                                     |
| [ ] Do not remind me; I will use the System / Administration / Backup now menu item.                                                                   |                                                                                 |
|                             [OK]       [Cancel]                                 |
+---------------------------------------------------------------------------------|

A similar dialog, as well as the target device selection dialog and an additional verification functionality will be available from the "System -> Administration -> Backup Configuration and Maintainance" menu item. This option will fire up the backup system's configuration and maintainace utility allowing the user to do several things:

+-----------------------------------------------------------------------+
|       Welcome to Ubuntu Personal Backup wizard                        |
|                                                                       |
|   Plesae choose one of the following:                                 |
|                                                                       |
|   [ ] Configure notification interval for doing backups.              |
|   [ ] Choose a media device for backup and restoration procedures.    |
|   [ ] Verify exisitng backup data.                                    |
|   [ ] Restore my data back to the hard drive (overwrites current data)|
|   [ ] Restore my data to an alternative location. (useful for         |
|       cherry-picking specific lost files and for verifying that your  |
|       backup is restorable)                                           |
|                                                                       |
|                          [Next]     [Quit]                            |
|                                                                       |
+-----------------------------------------------------------------------|

In addition, we will provide shorter paths to reach the 2 most important functionalities of the Backup System, through the familiar GNOME panel "System" Menu:

When the backup is finished, a note alert is displayed. Normally these are annoying, but in this case we want to provide extra reassurance that the backup was successful. In the case of backing up to CD or DVD, the alert also displays the suggested label for the disc (or for the last disc, if there was more than one.)

finished.jpg

Implementation

The basic idea here is to provide a GUI wrapping around an already exisitng command line tool that provides incermental backup functionality. The tool of choice is the DAR tool , currently available from universe. DAR is released under the GPL and already exposes a programmable API that we can use. DAR is also feature full and Ubuntu Personal Backup could be later on extended to include more functionality exposed by it. DAR also seems to be in wide use, and it is expected it will have sufficient bug fixes and upstream maintainership.

Considerations:

Package Dependencies:

Meta data to be stored on the backup medium:

Community Feedback

ManuLopezIbanez: Mandriva/Mandrake has already a similar tool called drakbackup (and surely it is GPL).

FranciscoColaco: We have a problem with the sets for backup. Cluttering the home directory with dot files, there are two kinds of files:

* configuration: .signature, .bash_profile, as an example * application state and cache: .thumbnails/*

We should backup the first, but not the second. Unfortunately, there are dou subdirectories that have both kinds of files (.gnome2/*) comes to mind.

Maybe we should broaden the problem and thing that configuration files should reside in their own directory, with symlinks to the home directory. Thus, $HOME/.signature -> $HOME/Configuration/signature. Then, backing up configuration would be surprisingly easy.

This is unfortunately the result of historical errors, but can be dealt with. Unfortunately, the number of applications that use those files (and mix them in subdirs) is huge.

So, at the home directory, there should be a clear separation between Documents, Configuration and Application State. Maybe with their subdirectories. Also, should media files be under $HOME/Documents or shoud they be set up in a group home page and backed up on their own? This should be, I think, a new wiki page in itself.

NicholasWheeler: I think if the "System Administrator" wants to back up his entire system, so that it would be easily restorable by putting in either a set of cds, dvds, or pointing to nfs, or a tape drive, it should be possible. The case scenarios don't cover a full system backup, but a full system backup would be pretty easy to implement with MondoMindi. It might take a little more work, but as far as I know this isn't going to be in dapper main at this state, anyways. MondoMindi also has the advantage that you can restore the backups on entirely different hardware, including different drive, (can even go from hda->sdb). An installation about 1-1.5 gigs altogether backs up to one cd-rom.

Code

References

Outstanding issues

Why is backup limited to sudoers?

JohnCBarstow: Non-sudoers should be able to back up their own home directory. Sudoers should have the option to back up all home directories and possibly the configuration files in the /etc directory.

Tiny suggestions

Some Cd writers are able to burn some text on cds.Ubuntu could detect if such a thing is possible with your cd burner and if so ask it he can write a label on the cd (the guy might not want so if he intends to re-use the cd)

JohnCBarstow: Perhaps an option to back up/restore over the network would be useful?

VenkatRaghavanI use [sbackup http://packages.ubuntu.com/dapper/admin/sbackup] which is available in universe. It already has a nice interface with regex support to exclude thumbnails, and IIRC also perform weekly backups.


CategorySpec

DapperHomeUserBackup (last edited 2008-08-06 16:37:51 by localhost)