Archiving snapshots

cp /usr/share/doc/rsnapshot/examples/utils/rsnaptar /usr/local/bin/

Make sure your backup scripts are owned by root, and not writable by anyone else.

chown root.root /usr/local/bin/rsnaptar
chmod o-w /usr/local/bin/rsnaptar

edit script and set directory paths

nano /usr/local/bin/rsnaptar

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

nano /etc/cron.daily/rsnaptar


#!/usr/bin/env bash


  • 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,