Difference between revisions of "Service/backup"
Line 4: | Line 4: | ||
* /backup on [[Machine/housetree]]: daily filesystem backups for [[Machine/sunjammer]] | * /backup on [[Machine/housetree]]: daily filesystem backups for [[Machine/sunjammer]] | ||
* /backup on sunjammer.sugarlabs.org: daily database dumps (ldap, mysql and pgsql) for [[Machine/sunjammer]] | * /backup on sunjammer.sugarlabs.org: daily database dumps (ldap, mysql and pgsql) for [[Machine/sunjammer]] | ||
− | * backup.sugarlabs.org: daily backups of all other systems | + | * backup.sugarlabs.org: daily backups of all other systems (see below) |
== Administrative contact == | == Administrative contact == |
Revision as of 16:16, 27 December 2011
Locations
- /backup on Machine/treehouse: daily filesystem backups for Machine/jita
- /backup on Machine/housetree: daily filesystem backups for Machine/sunjammer
- /backup on sunjammer.sugarlabs.org: daily database dumps (ldap, mysql and pgsql) for Machine/sunjammer
- backup.sugarlabs.org: daily backups of all other systems (see below)
Administrative contact
bernie AT sugarlabs DOT org
Sysadmins
For non-emergency calls, preferably send email to the administrative contact.
- Bernie Innocenti
- Ed McNierney @ OLPC (local access)
backup.sugarlabs.org
This is the main backup server for all Sugarlabs Machines.
Backup account:
sugarbackup@backup.sugarlabs.org:/home/sugarbackup/
(backup.sugarlabs.org is an alias for owl.laptop.org)
We use the script system-full-backup to perform the daily backups with duplicity. Each machine backup is encrypted with a different password. If you need a password, ask User:Bernie.
Sunjammer
Machine/sunjammer's filesystem is being backed up on Machine/treehouse using rsync + 7 days of history with hard links.
The MySQL, PostgreSQL and LDAP databases are being backed up daily on backup.sugarlabs.org, encrypted with gpg. TODO: at the moment, we don't have a script to cleanup old backups.
Restoring files from duplicity backups
To restore a backup try something like:
duplicity restore -t 7D --restore-time <yyyy/mm/dd --file-to-restore <source/path/to/restore/from> scp://sugarbackup@backup.sugarlabs.org/backup/<machine.sugarlabs.org> </destination/path/to/restore/to>
- Replace <> with your values
Example:
duplicity restore -t 7D --restore-time 2000/01/01 --file-to-restore var/lib/mysql/wordpress scp://sugarbackup@backup.sugarlabs.org/backup/sunjammer.sugarlabs.org /home/bernie/restore/wordpress
the --restore-time is a workaround for a bug in duplicity when restoring backups in the past
See Also
- There are instructions on how to set up a backup here: Infrastructure_Team/Template_virtual_machine_lucid