How To Install Rsnapshot on RHEL/CentOS 6 & 7











This tutorial will describe you how to install rsnapshot on RHEL/Centos. It is a simple automated backup solution which based on rsync. It is an open source utility that provides incremental backups. It is a file system snapshot utility written in Perl.

First you will have to install and enable third-party repository called EPEL.

RHEL/Centos 7 64-Bit:

1) wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm


2) rpm -ivh epel-release-7-0.2.noarch.rpm

RHEL/Centos 6 64-Bit:

1) wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

2) rpm -ivh epel-release-6-8.noarch.rpm

RHEL/Centos 6 32-Bit:

1) wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

2) rpm -ivh epel-release-6-8.noarch.rpm

Install rsnapshot via Yum:

1) yum install rsnapshot

Next create a backup directory and mount any partitions where you want to store all your backups

1) mkdir /impbackup

2) mount /dev/sda3 /impbackup

3) vi /etc/fstab


Search for and Edit the following parameter to set the backup location in rsnapshot config file

1) vi /etc/rsnapshot.conf

snapshot_root                                  /impbackup/

If you want that rsnapshot can securely transfer your data to a backup server through ssh then To uncomment the line remove the “#” in-front of the following line so that rsnapshot can securely transfer your data to a backup server.

cmd_ssh                                /usr/bin/ssh

Next step is that you need to decided how many old data to keep in backup server search for the following parameter to set the backup intervals. Well, the default settings are good enough but define your own schedule as per your requirements.

#########################################
#           BACKUP INTERVALS            #
# Must be unique and in ascending order #
# i.e. hourly, daily, weekly, etc.      #
#########################################

interval        hourly      6
interval        daily         7
interval        weekly     4
interval        monthly    3

This will take backup every six hours on a day. Define your own schedule as per your requirements.

Backup Local Directories:

The next thing I configured was the backup points. For example, I am taking backup of my /home and /etc directories.

backup                       /home/                        localhost/
backup                       /etc/                            localhost/

Backup Remote Directories:

Now next step I want to backup my remote server directories.
backup                       root@example.com:/home/                       /data/backup/
Verify Rsnapshot Configuration:
rsnapshot configtest
Running Rsnapshot Manually:

 rsnapshot hourly

Automating the Process

0     */2    * * *    root    /usr/bin/rsnapshot hourly
30     3     * * *    root    /usr/bin/rsnapshot daily

Runs every 2 hours and creates an hourly directory under /backup directory.

Runs daily at 3:30am and create a daily directory under /backup directory.





1 comment :

1 comment :

  1. How To Install Rsnapshot On Rhel/Centos 6 And 7 >>>>> Download Now

    >>>>> Download Full

    How To Install Rsnapshot On Rhel/Centos 6 And 7 >>>>> Download LINK

    >>>>> Download Now

    How To Install Rsnapshot On Rhel/Centos 6 And 7 >>>>> Download Full

    >>>>> Download LINK 8m

    ReplyDelete