d
An igniting portfolio theme designed
to help you leave quite a mark.
Back to Top

Install and configure Linux/Ubuntu 16.04/18.04 rSnapshot

Install rsnapshot

sudo apt install rsnapshot

Configure rsnapshot

sudo nano /etc/rsnapshot.conf
#################################################
# PLEASE BE AWARE OF THE FOLLOWING RULE:        #
# This file requires tabs between elements      #
#################################################

snapshot_root   /var/backups/
cmd_ssh        /usr/bin/ssh
cmd_du         /usr/bin/du

# local Backup
backup  /home/          localhost/

# remote Backup
backup  root@192.168.1.***:/home/          maqremota/

(a lot of attention to the tabs)

Test the configuration:

sudo rsnapshot configtest

Note:
For remote backups, root-to-root access via public/private keys is required.

Run rsnapshot manually

sudo rsnapshot alpha

or:

sudo rsnapshot beta

or:

sudo rsnapshot gamma

or:

sudo rsnapshot delta

Note:
Rsnapshot only creates beta backups after completing the entire alpha cycle (retain alpha 6), gamma only after completing the beta and so on.

Configure rsnapshot schedules

sudo  nano /etc/cron.d/rsnapshot
0 */4         * * *           root    /usr/bin/rsnapshot alpha
30 3          * * *           root    /usr/bin/rsnapshot beta
0  3          * * 1           root    /usr/bin/rsnapshot gamma
# 30 2        1 * *           root    /usr/bin/rsnapshot delta

Credits: https://www.carrondo.net

Review and tested by: Cristiano Costa

Post a Comment