my net house

WAHEGURU….!

Rsnapshot: makes life really easy

Rsync=Local backup, Rsync over ssh=server backup. Take XXX.XXX.XXX.XXX as your IP address(local or remote).

First download Rsnapshot and install. I am using Bodhi Linux and used apt package.

Prepare you server for password-less  entry. Create keys and send to your server.(Optional if you are curious and Super Geek 😉 )

$ sudo ssh-keygen -t dsa

Now go to .ssh directory.

$ cd .ssh

$ sudo ssh-copy-id -i id_dsa.pub root@XXX.XXX.XXX.XXX

Now chek if you are successfully able to run the command below

$ sudo ssh root@XXX.XXX.XXX.XXX

now Edit /etc/rsnapshot.conf.

Check your rsnapshot root

snapshot_root /var/cache/rsnapshot/

Un-comment the following Line

cmd_ssh /usr/bin/ssh

Read carefully the file. It uses <tab> rather than space. Move down and down and read the file you will find some settings like Intervals for backup and remote commands. You can read and give try if you want.

Now if you are backing up Local go under #localhost for remote go under # EXAMPLE.COM

I am doing server backup here so I add following under #EXAMPLE.COM

backup root@128.199.226.232:/etc/ myserver-etc/   (remember <tab> here. This line is like backup<tab>root@128.199.226.232:/etc/<tab>myserver-etc/)

So in the above line we are instructing Rsnapshot to bakup /etc folder on server to /myserver-etc on local computer. /myserver-etc will be created automatically under rsnapshot root(locally).

Save & Exit.

$ sudo rsnapshot configtest

if you did everything OK you will be get output: Syntax OK

$ sudo rsnapshot hourly

It will start Rsnapshot on hourly basis for backup. It will take some time to complete the command. After the completion you can move to rsanpshot root and check for backed-up files like hourly.0 or hourly.1

To stop use:

$ sudo rsnapshot -q hourly

I followed the tutorial from: https://www.youtube.com/watch?v=Pf2uC9izWtI&list=PL46CECC9242712613

PS:It is difficult to do read all and follow steps. 😛 NEED SCRIPTING….!!! 😀

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: