====== Ubuntu - Backups - Backup using rsnapshot ====== rsnapshot is a remote filesystem snapshot utility, based on rsync. * rsnapshot hardlinks files if they already exists and the backups do not take much more space than the actual filesystem you are backing up. ---- ===== Configure ===== An example config file (/root/scripts/rsnapshot-home.conf) to backup a remote file-server. config_version 1.2 snapshot_root /media/Backup/ cmd_cp /bin/cp cmd_rm /bin/rm cmd_rsync /usr/bin/rsync cmd_ssh /usr/bin/ssh cmd_logger /usr/bin/logger cmd_du /usr/bin/du interval daily 7 interval weekly 4 interval monthly 3 verbose 2 loglevel 4 logfile /var/log/rsnapshot-home.log exclude_file /root/scripts/rsnapshot-home.exclude rsync_long_args --delete --numeric-ids --delete-excluded lockfile /var/run/rsnapshot.pid backup username@example.com:/export/files/ files/ **NOTE:** The config file is tab delimited so you will get errors if you use space instead! ---- ===== Manual daily backup ===== **NOTE:** A passwordless SSH connection should be configured from the backup server to the file server if you plan to run this as a automated job using crontab. sudo rsnapshot -c /root/scripts/rsnapshot-home.conf daily **NOTE:** This will produce a folder structure like this with the backups /media/Backup/daily.0/files /media/Backup/daily.1/files /media/Backup/daily.2/files /media/Backup/daily.3/files ... Where daily.0 is the newest backup. * The backup files are store in the same form as on the file server so they can be browsed using a regular file browser. ---- ===== Reports ===== A report can be configured to be sent after every backup with the perl script **rsnapreport.pl**. ---- ===== References ===== The rsnapshot HOWTO