BackupSolution
From HerzbubeWiki
Contents |
Backup of important stuff on osgiliath
The following important and often-changing data on osgiliath is backed up regularly and often:
- dump of all MySQL databases
- dump of all LDAP database (currently there is only one)
- dump of all Subversion repositories
- the entire directories /etc, /boot
- various files in /usr/local
- MailMan archives in /var/lib/mailman/archives
- SquirrelMail user configuration files in /var/lib/squirrelmail
- various files in /var/www
- all directories in /var/samba/daten that are not in this list
- backup
- cdrom
- DVD
- iPhoto Library
- iTunes Music
- mp3*
- Software
- only once per week: all user home directories (including /root); if a home directory contains the folder exclude, that folder is excluded from backup
The backup script /usr/local/cron/backup.sh is executed daily at 04:00 in the morning by the cron service of user root.
To get a history of backup files, the logrotate service which runs at 06.25 in the morning is configured as follows (excerpt of /etc/logrotate.d/osgiliath):
/var/backups/mysql/all-databases.sql /var/backups/ldap/database-1.ldif /var/backups/svn/*.dump /var/backups/etc/etc.tar /var/backups/usr.local/usr.local.tar {
daily
missingok
rotate 60
compress
nocreate
}
/var/backups/var.lib/*.tar /var/backups/var.samba/*.tar /var/backups/var.www/*.tar {
daily
missingok
rotate 30
compress
nocreate
}
/var/backups/home/home.tar {
weekly
missingok
rotate 3
compress
nocreate
}
/var/backups/boot/boot.tar {
monthly
missingok
rotate 24
compress
nocreate
}
Note about /home: User home directories grow very large (about 700 MB at the time of writing this), therefore we can't just rotate the backup file 60 times. The above logrotate script rotates once per week, and we keep 3 old files, which together with the current backup file serves as a one-month history.
When I turn on one of my desktop or laptop machines, it runs an rsync job that transfers the current set of backup files from osgiliath to the desktop/laptop machine. This serves the purpose of data replication, in case that the hard disk drive of osgiliath evaporates.
To cover the worst case scenario, I periodically burn the backup data to DVD and then give the DVD to a friend whom I trust.
Occasional data backup on osgiliath
/var/samba contains large sub-directories whose content is backed up only occasionally:
- daten/DVD - no backup at all
- daten/Software - no backup at all
- daten/iPhoto Library - backup with a combination of Finder and Toast, since iPhoto 4 apparently cannot archive its library across multiple media
- daten/iTunes Music and daten/mp3* - backup with iTunes
- everything else is included in the daily backup of important data (see above)
Occasional system backup on osgiliath
Full backup of the entire system, with the following exclusions:
/home/*/exclude /proc /sys /tmp /var/backups /var/samba
The backup script /usr/local/bin/system-backup.sh creates backup files in
/var/samba/daten/backup
After backup is complete, the files can be taken from there and burned to DVD (at the time of writing, one 4.7 GB DVD is barely enough to hold everything).
Occasional backup of Mac desktop files
TBD
Windows machine
No backup: all data is located on the file server, and programs can be re-installed.
Backup history
Basic inventory:
osgiliath system backups:
- 06.05.2007 (1 DVD)
- 06.03.2009 (2 DVDs)
iPhoto library:
- 05.03.2007 (1 DVD with albums 2001-2005, 1 DVD with albums 2006+2007)
Important data backup
- 08.05.2007 (2 DVDs)
- 06.03.2009 (1 DVDs)
