Domain Name Yahoo

Easy Help Troubleshoot Your Linux Box



  

Easy Help Troubleshoot Your Linux Box


Backup Server using rsync #1

  

Yes, you can use rsync as your backup system over the network.

Here is my real problem on site:

  • The box must not restart, shutdown or any downtime.
  • The firewall has configured with only couple of port opened ( SSH, ftp ) these port has been changed into un-usual port. ( lets say 30022 as SSH, and 30021 as ftp ).
  • I want to do all backup process automatically.

and Here’s my preparation.

  • I have another box connected to internet with the same port opened. I dont want to have the usual port for SSH and FTP, hacker always try to hijack these port.
  • Another media or harddrive must be prepared.

Here is the steps

First.

Make sure client-server are connected each other using ssh port (30022).
The idea is the server will connect to client using rsync with 30022 port. So, there will be no rsync daemon installed on server.

The basic syntax I am going to use is

rsync -av –progress –inplace –rsh=’ssh -p30022′ /etc root@client_ip:somedir/
lets try to run that syntax first, dont forget to change client_ip .
Run it on Server shell. And you will be prompted for client root’s password.

Last line of the result is :

etc/yum/yum-updatesd.conf
490 100% 0.84kB/s 0:00:00 (xfer#1990, to-check=2/3375)
etc/yum/pluginconf.d/
etc/yum/pluginconf.d/installonlyn.conf
84 100% 0.14kB/s 0:00:00 (xfer#1991, to-check=0/3375)

sent 108993486 bytes received 42267 bytes 31153072.29 bytes/sec
total size is 108818539 speedup is 1.00

When I see in ~root/somedir there are complete files of /etc directory from server.

Execute once again the same above syntax will not result anything like before, that mean the directory has been synced.

What do you thinkĀ  ? Not bad huh ?
You can repeat this step for another directory / from the server.

Another challange here is , ” Can I do this on Crontab schedule ?”.
As you can see above, you must enter root’s password, and this cannot be done by crontab.

…. to be continued..


April 29th, 2009 Posted by admin | CentOS, General, Ubuntu, backup | no comments

No Comments »

No comments yet.

Leave a comment