rsnapshot(1)
rsnapshot is a filesystem snapshot utility that creates incremental backups of entire directories using rsync and hard links.
Synopsis
rsnapshot [OPTION]... [COMMAND]Description
rsnapshot is a backup utility that performs incremental backups using rsync and hard links. It maintains multiple snapshots (hourly, daily, weekly, monthly) with minimal disk space by storing only changed files and using hard links for unchanged data.
Configuration is managed through /etc/rsnapshot.conf. rsnapshot runs common backup commands like rsync and ssh to create point-in-time snapshots of local or remote filesystems. Each snapshot is a complete directory tree that can be restored as-is.
Typical workflow involves configuring backup sources in rsnapshot.conf, testing with the configtest command, and scheduling snapshots via cron jobs.
Common options
| Flag | What it does |
|---|---|
configtest | verify configuration file syntax without making changes |
-c /path/to/config | specify alternate configuration file (default: /etc/rsnapshot.conf) |
-v | verbose output; show files being processed |
-vv | extra verbose output with detailed rsync messages |
-d | dry-run; show what would be done without making changes |
-D | debug mode; very verbose output for troubleshooting |
-t | test mode; same as configtest |
-x | don't cross filesystem boundaries (single filesystem only) |
Examples
validate the configuration file syntax before running backups
rsnapshot configtestrun the hourly backup snapshot using explicit config path
rsnapshot -c /etc/rsnapshot.conf hourlyperform a daily backup with verbose output showing progress
rsnapshot -v dailydry-run of weekly backup to see what would be backed up
rsnapshot -d weeklyrun monthly backup in debug mode and view first 50 lines of output
rsnapshot -D monthly 2>&1 | head -50cron job to run hourly snapshots every 4 hours
0 */4 * * * /usr/bin/rsnapshot hourlyview contents of the most recent hourly snapshot
ls -la /var/cache/rsnapshot/hourly.0/test backup with alternate config in extra verbose dry-run mode
rsnapshot -vv -d -c /etc/rsnapshot.test.conf daily