Welcome to rdiff-backup-tools! Rdiff-backup-tools is a set of simple and effective bash scripts that vaguely emulate EMC's Legato NetWorker. Summary: -------- rdiff-backup-tools.conf - define save sets etc rdiff-backup-save - do saves rdiff-backup-info - report details about saves rdiff-backup-recover - do recovers rdiff-backup-report - report save summaries rdiff-backup-expire - remove old saves rdiff-backup-tools.cron - cron script for automating saves rdiff-backup-tools.logrotate - logrotate the log file Requirements: ------------- This is tested on Red Hat Enterprise Linux, but it should run on any Unix/Linux system with a full rsync install (e.g the librsync and librsync-devel RPMs) and rdiff-backup. For remote "client to server" backups, you can use rdiff-backup-save and rdiff-backup-recover, but you must SSH to the server to use the other tools. Install: -------- sudo make install Quick Start: ------------ ## Read over the config... more /usr/local/etc/rdiff-backup-tools.conf notice how "Source[1]=/etc", "Destination[1]=/tmp/save/etc" and "Expire[1]=1Y" are set ## Setup and show defined save sets... export PATH=$PATH:/usr/local/sbin sudo mkdir -p /tmp/save/etc /tmp/recover sudo rdiff-backup-info list ## Save with debug output... sudo rdiff-backup-save --debug ## View the details... sudo rdiff-backup-report ## View most recent summary and the log... sudo more /var/log/rdiff-backup.summary sudo more /var/log/rdiff-backup.log ## Get info on /etc/passwd... sudo rdiff-backup-info files | grep /etc/passwd sudo rdiff-backup-info ls | grep /etc/passwd ## Recover the most recent /etc/passwd... sudo cp -p /tmp/save/etc/passwd /etc/passwd.R ## Second save... including a new file... sudo touch /etc/frobnitz.conf sudo rdiff-backup-save sudo rdiff-backup-info changed ## Third backup... removes the new file... sudo rm /etc/frobnitz.conf sudo rdiff-backup-save sudo rdiff-backup-report sudo rdiff-backup-info changed ## Fourth backup is a no-op... sudo rdiff-backup-save sudo rdiff-backup-report # notice just current mirror updates ## Recover the frobnitz.conf file... # Note: the following is an awkward yet definitive # way to recover the second-most save. Usually # one would just use a relative time like... # "sudo rdiff-backup-recover --as-of 7D ..." secondmost=`sudo rdiff-backup-report | tail -4 | head -1 | cut -c5-28` # Note: rdiff-backup requires that all of /etc # gets restored... sudo rdiff-backup-recover --debug --as-of "$secondmost" /etc /tmp/recover/etc ls -l /tmp/recover/etc/frobnitz.conf Configuration: -------------- vi /usr/local/etc/rdiff-backup-tools.conf Operation: ---------- ## set up automatic log rotation.... sudo cp rdiff-backup.logrotate /etc/logrotate.d/rdiff-backup ## set up automatic backups... sudo cp rdiff-backup.cron /etc/cron.daily/ ## run (test) backups now... sudo at now /etc/cron.daily/rdiff-backup.cron ^d read root's mail, after 4am tomorrow. and, also, refer back to the Quick Start. steve rader