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. 1
Installation
rsnapshot can be installed with the Pakfire web interface or via the console:
pakfire install rsnapshot
Usage
There is no web interface for this Addon. To run this Addon open the client console or terminal and access the IPFire box via SSH.
To obtain a list of possible commands, options, and arguments enter rsnapshot help
. The output is similar to this:
$ rsnapshot help
rsnapshot 1.4.5
Usage: rsnapshot [-vtxqVD] [-c cfgfile] [command] [args]
rsnapshot is a filesystem snapshot utility. It can take incremental
snapshots of local and remote filesystems for any number of machines.
Options:
-v verbose - Show equivalent shell commands being executed.
-t test - Show verbose output, but don't touch anything.
This will be similar, but not always exactly the same
as the real output from a live run.
. . .
Example: Local backup of IPFire device
- Format (as ext4) and mount an external drive. See Extra HD
- Example: mount point of
/mnt/hdd
- Example: mount point of
- Create a new directory for the repository
- Example:
mkdir --verbose --mode=777 /mnt/hdd/rsnapshot
- this is snapshot_root from the
/etc/rsnapshot.conf
file
- Example:
- Make your changes to the
/etc/rsnapshot.conf
file. - Run this command to check the
/etc/rsnapshot.conf
file:
$ rsnapshot configtest
5a. Make changes to fcron.hourly, fcron.daily, fcron.weekly, fcron.monthly:
ln -vs /var/ipfire/backup/bin/rsnapshot-hourly /etc/fcron.hourly
ln -vs /var/ipfire/backup/bin/rsnapshot-daily /etc/fcron.daily
ln -vs /var/ipfire/backup/bin/rsnapshot-weekly /etc/fcron.weekly
ln -vs /var/ipfire/backup/bin/rsnapshot-monthly /etc/fcron.monthly
-or-
5b. Make changes to fcrontab:
# m h dom mon dow command
30 * * * * /usr/bin/rsnapshot sync 2>&1 && /usr/bin/rsnapshot hourly 2>&1
20 0 * * * /usr/bin/rsnapshot daily 2>&1
15 0 * * 0 /usr/bin/rsnapshot weekly 2>&1
10 0 1 * * /usr/bin/rsnapshot monthly 2>&1
05 0 1 1 * /usr/bin/rsnapshot yearly 2>&1
Links
-
Introduction from https://rsnapshot.org ↩