Rsnapshot tutorial on how to do Archiving of snapshots
What is Rsnapshot?
From the official website: “rsnapshot is a filesystem snapshot utility based on rsync. rsnapshot makes it easy to make periodic snapshots of local machines, and remote machines over ssh. The code makes extensive use of hard links whenever possible, to greatly reduce the disk space required”.
Make sure your backup scripts are owned by root, and not writable by anyone else.
edit script and set directory paths
set TAR_DIR to path where snapshot will be archived, and SNAPSHOT_DIR to where the daily snapshot is located
please note that the hourly cycle needs to complete in order for the daily snapshot to be created.
This script supports gpg encrupting of files, to disable it comment out following fline in /usr/local/bin/rsnaptar
Scheduling execution via cron
- this howto does not use the GPG option to encrypt files, if this is a necessity than I can update the howto to include file encryption for better security,
- by default script is run standalone, but it could be modified to run as a backup_script via rsnapshot itself,