rlbackup: (rsync-based) Remote Linked Backup http://www.math.ualberta.ca/imaging/rlbackup INSTALLATION INSTRUCTIONS Note that rsync version 2.5.6 or later is required on each client. (Step 7 provides a convenient way of doing this). Please read the file UPGRADING_FROM_2.12 if you are upgrading from version 2.12 or earlier. On the backup server, you will need to install the rsync source code (version 2.5.6 or later) since we need to build a static binary (for security reasons, dynamically linked libraries should not be used for the chrooted filesystem). The instructions below assume that the rsync source code (available from http://rsync.samba.org) is in /usr/local/src/rsync-x.x.x and that your working directory is the rlbackup installation directory (after gunzipping and untarring the rlbackup tar.gz file). SERVER should be replaced by the fully qualified name of the backup server and CLIENT should be replaced by a a unique user name (usually the hostname) assigned to the client. It is limited by the maximum username length (typically 32 characters). By default the backup directory on SERVER is /backup, but you can easily move this to any other location after installation simply by making a symbolic link from /backup to the new location and adding the new directory name to /usr/local/etc/rlbackup.exclude. 1. On root@SERVER: ln -s /usr/local/src/rsync-x.x.x rsync-src Here x.x.x denotes the appropriate version numbers. This configures rlbackup to find the right rsync source code. Now install the server files: make install-server Finally, install a separate backup directory for each CLIENT: make install-backup-dir client=CLIENT It is also advisable to add the top level backup directory (by default /backup) to PRUNEPATHS in /etc/updatedb.conf 2. On root@CLIENT: make install-client Change the strings "CLIENT" and "SERVER" in /usr/local/etc/rlbackup.conf to the appropriate corresponding names. Also add the list of filesystems to be backed up to the variable FILESYSTEMS. Add any additional excluded file names to /usr/local/etc/rlbackup.exclude. Set up passwordless ssh public key access from the client to CLIENT@SERVER by putting the public key (either with empty passphrases or using the keychain utility from http://www.gentoo.org/proj/en/keychain.xml) for root@CLIENT in /backup/CLIENT/.ssh/authorized_keys on the SERVER. Verify that you can ssh CLIENT@SERVER from root@CLIENT without a password (the shell should exit immediately). 3. Test rsyncsh on CLIENT@SERVER from root@CLIENT: rsync -e ssh CLIENT@SERVER: This should return a remote directory listing that includes a "bin" and "snapshot" directory. 4. Initiate a remote-linked backup with the command /usr/local/bin/rlbackup & You may wish to use cron to launch this command on a daily basis. The list of backups can be viewed with the command rlrecover The backup of directory dir from snapshot 1 can be listed with the command rlrecover 1/dir/ and recovered into the current working directory with the command rlrecover 1/dir . Users can be given read access to their backups by using snfs (http://www.math.ualberta.ca/imaging/snfs/) to mount the /backup/CLIENT/snapshot directory as a read-only filesystem. 5. If you want to backup to more than one host, you can set up separate files /usr/local/etc/rlbackup2.conf and /usr/local/etc/rlbackup2.exclude You will need to mkdir /var/log/rlbackup2 You can also use a second configuration to backup other FILESYSTEMS to another DEVICE. Use commands of these forms to access configuration set 2: rlbackup 2 & rlrecover . "" 2 rlrecover 1/dir/ "" 2 rlrecover 1/dir . 2 6. If you run updatedb (locate) on the CLIENT, you may wish to remove /backup from consideration by adding it to the PRUNEPATHS list in /etc/updatedb.conf 7. [Optional] For clients of the same architecture (especially those lacking the right version of rsync), it may be more convenient to do the rlbackup installation by first executing in the (server) rlbackup installation directory make tarball This will build the file rlb.tar.gz, including a static rsync binary called rsync-static, which can then be put in /usr/local on each client. Client installation can then be accomplished with the commands tar -zxf rlb.tar.gz mkdir -m 0600 -p /var/log/rlbackup Note: if you want to avoid overwriting rlbackup.conf and rlbackup.exclude, replace the first command with tar -kzxf rlb.tar.gz etc tar -zxf rlb.tar.gz bin