Backup System using Rsnapshot on Ubuntu 12.04

Linux-LogoRsnapshot makes a “full backup” and uses this rsync and hard links . This ensures that (for rsync), the changes are transferred and the Hard links allow a space-saving multi-step backup. The file system on the backup disk must of course allow hard links. Backups of remote hosts using “rsync over ssh “or rsync server over the network performed well NFS is possible.
rsnapshot runs on all UNIX -based operating systems and is available as free software under the terms of the GPL source code available.

Rsnapshot is available in Ubuntu.s default repositories, so we can install it using apt-get:

In this article we will use password less SSH for back up process. So for passwordless we need to create SSH key pairs on the back up system to authenticate it with it’s clients (backing up machines).

On Backup Server:

The above command will create two keys on .ssh folder located at home directory named “id_rsa” and “”.
Now we will copy the public key i.e. to the client machine for authentication.

On Client Server:

Now we will append the public key to the authorized_keys file for authentication.

On Backup Server:

Test the authentication

Now you should able to login to the client machine.

rsnapshot configuration:

Edit the configuration file of rsnapshot as your requirement.

Modify the path where you want to keep the backup files:

Uncomment the line to enable rsync over ssh

Uncomment the line to to enable accurate disk usage report

Modify the Backup interval section

Modify the backup points

NB: Use Tab to separate the options. Don’t use space.

Now we are done with our configuration
Validate the configuration by issuing the below commands.

Verify the backup path and you will able to see the files over there.

You can add the command to the crontab to make it automated.

The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply