Trial1 Backup


Jump to: navigation, search

Note: This is outdated - see XS_Blueprints:Datastore_Simple_Backup_and_Restore - says Martinlanghoff


User Experience

The experience of backup should be transparent to the student, and simple to administer for teachers.

Backup is the one interaction between student and server which is not anonymous. A laptop must be bound (registered) with a server before it can perform backups. This binding is done by a teacher or administrator. After a student has received a laptop, and typed in a nickname, sugar will start.

The laptop will immediately bind the first school mesh it encounters. A laptop performs its backups to the school mesh (collection of servers) with which it was bound. These backups will happen periodically each day, with no user intervention needed or notice given.

Individual files deleted from the laptop may be restored through the Journal (or web browser in Trial1), or through a simple console command (no arguments). This command will restore any content associated with recent tasks in the Journal (or all files backed up in Trial1).

When a laptop is upgraded:

  1. A backup is manually triggered
  2. The laptop is upgraded
  3. A student enters their nickname (possibly changed)
  4. If the school mesh is the one that laptop was previously associated with, it is automatically restored (and the student's nickname changed if a different one was entered.) If it is a new school mesh, the laptop binds to the new mesh.

When a laptop is broken:

  1. A new laptop is assigned to the student
  2. A student enters their nickname (possibly changed)
  3. An administrator uses ? user interface (command line on the laptop for now) to change the student's laptop ID to the serial number of the new laptop.
  4. A manual restore is triggered.


The backup script is run automatically (every few minutes) on the XO laptop, placing the contents of the Journal directory on the School server.

It may be manually triggered (for example, right before an upgrade). This may be done by typing backup at a command line. Eventually, there might be a way to trigger this through sugar.


There are two cases why a backup might be restored. One is that a student accidentally deleted desired files from their laptop. Another is that a laptop has been replaced, and needs to be restored.

In the case of accidental deletion, simply type backup-restore from a command line.

The following is not needed for the week of 5/17 demo. Simply bond with the same nickname and use backup-restore.

In the case of laptop replacement, have the student go through the bonding (nickname and color) procedure with the new laptop. Then:

  1. Insert teacher USB key into laptop (optional)
  2. Obtain a console, by simultaneously pressing Ctl Alt and F2 (the world view key). Log in as root.
  3. Type identity-restore "nickname". If teacher USB key isn't present, a password prompt will be used.
  4. Return to the sugar console by simultaneously pressing Ctl Alt and F4 (the app view key)

Teacher USB keys contain a private key identifying an administrator of the school. The password requested if a USB key is not present is that of the xoreg user on the school server.

Installing the software

This step is only needed until backup and restore are added to the next stable build.

  1. Insert teacher USB key into laptop
  2. Obtain a console, by simultaneously pressing Ctl Alt and F2 (the world view key). Log in as root.
  3. Type mount /dev/sda1 /mnt to mount the USB key (only needed until automount supported).
  4. Run the install script by typing /mnt/install-backup
Personal tools
  • Log in
  • Login with OpenID
About OLPC
About the laptop
About the tablet
OLPC wiki