[CentOS] Limiting files when using rsync

Thu Jan 25 16:31:40 UTC 2007
Mark Schoonover <schoon at amgt.com>

Todd Cary wrote:
> Mark -
> 
> Thanks!  That did it.
> 
> 
> /usr/bin/rsync -av --exclude=".*" -e ssh /home/ 192.168.0.22:/home/
> My next step will be to brush the dust off of my Perl book and write
> a crontab script to backup nightly. 
> 
> Question: I may not be using the term "backup" absolutely correctly. 
> The destination server is a "standby" server.  This is if the source
> server fails, all I have to do is change the router to point to the
> standby server.  These are in a home office and I do not consider
> myself a system administrator; just someone who knows enough to keep
> the server running (it's main task is FTPing).  Do you have any
> suggestions about using rsync as I am doing?      
> 

Todd,

	If all you want to do is mirror the main server to the backup
server, your command is almost correct. You'll want to add --delete on the
commandline. This will cause rsync to remove any files from the destination
before sending them from the source. This will create a mirror of your  main
server to your backup server.

	You don't need to go to all the overhead of running Perl to crontab
this up. Just drop your rsync command into a file, make it executable then
add it to root's crontab file. It'll run just fine after that.

	One other thing nonrsync related - top posting, and sending HTML to
the list. Makes it hard to respond to your questions. Just remember to use
text only, and post responses at the bottom of your emails. Things just
tread much easier from top to bottom.

Thanks!

Mark Schoonover 
IS Manager 
American Geotechnical - California, Nevada and Arizona 
V-> 858.450.4040 F-> 714.685.3909 C-> 858.472.3816
* software development * systems administration * networking * security *