rsnapshot is a powerful backup tool for Linux. It has many features you need for full, incremental daily or any time backup. rsnapshot can be installed on most Linux distribution or server. This tutorial is going to show you how to install and configure rsnapshot on ClearOS 7
For more information, please visit the official website of rsnapshot. This link also useful to get started with rsnapshot on CentOS based Linux. So, let’s get started.
First Install rsnapshot on ClearOS 7
yum install rsnapshot
rsnapshot is located on EPEL repository. You have to enable EPEL repository in order to install this rsnapshot. Once installed we can start to configure it. The configuration file of rsnapshot is located in /etc/. You can edit it using your favorite text editor.
nano /etc/rsnapshot.conf
Configure Snapshot Directory
First we need to specify the backup directory which will be used to store all backups. Find the snapshot_root section on the rsnapshot.conf file as follow
The default location will be /.snapshots/ and we can change it to something else such as
/srv/backups/
So it will become this:
And don’t forget to create the folder/directory if not exist
mkdir -p /srv/backups
Configure Snapshot Intervals
Now its time to configure the backup or snapshot interval. You may use existing backup intervals on the default config. Or, you may want to edit it as you need. The default value is like this one below
On this example, I will change the interval to only daily weekly and monthly. I will skip the hourly backup.
Backup Source
Now we need to specify which directory to be included in the backup. Go to Backup Points / Scripts section
I will only backup my home directory so, I change the script into
Now close and save the rsnapshot.conf. Now execute this command to check the syntax.
rsnapshot configtest
It should returned something like this and no errors
Run Backup
To run the backup, for example the daily one, use this command
rsnapshot -v daily
Output:
Thank you. On the next post, I will show you how to automate the backup process.