$linuxjunkies
>

rsnapshot(1)

rsnapshot is a filesystem snapshot utility that creates incremental backups of entire directories using rsync and hard links.

UbuntuDebianFedoraArch

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

FlagWhat it does
configtestverify configuration file syntax without making changes
-c /path/to/configspecify alternate configuration file (default: /etc/rsnapshot.conf)
-vverbose output; show files being processed
-vvextra verbose output with detailed rsync messages
-ddry-run; show what would be done without making changes
-Ddebug mode; very verbose output for troubleshooting
-ttest mode; same as configtest
-xdon't cross filesystem boundaries (single filesystem only)

Examples

validate the configuration file syntax before running backups

rsnapshot configtest

run the hourly backup snapshot using explicit config path

rsnapshot -c /etc/rsnapshot.conf hourly

perform a daily backup with verbose output showing progress

rsnapshot -v daily

dry-run of weekly backup to see what would be backed up

rsnapshot -d weekly

run monthly backup in debug mode and view first 50 lines of output

rsnapshot -D monthly 2>&1 | head -50

cron job to run hourly snapshots every 4 hours

0 */4 * * * /usr/bin/rsnapshot hourly

view 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

Related commands