Todd Cary wrote:
I use the following command to sync the home directory on the two computers, however I would like not to send the "dot" files e.g. ".ssh". Can that be done, and if so, how would I construct the command line?
/usr/bin/rsync -av -e ssh /home/ 192.168.0.22:/home/
Many thanks....
Todd
Todd,
I'm pretty sure you need to --exclude '.*' on the command line, buh I usually put all my excludes in a file and --exclude-from=rsync.excludes.
Thanks!
Mark Schoonover IS Manager American Geotechnical V: 858-450-4040 - F: 714-685-3909 - C: 858-472-3816
"Stop the Earth!! I want off!!"
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
Mark Schoonover wrote:
Todd Cary wrote:
I use the following command to sync the home directory on the two computers, however I would like not to send the "dot" files e.g. ".ssh". Can that be done, and if so, how would I construct the command line?
/usr/bin/rsync -av -e ssh /home/ 192.168.0.22:/home/
Many thanks....
Todd
Todd,
I'm pretty sure you need to --exclude '.*' on the command line, buh I usually put all my excludes in a file and --exclude-from=rsync.excludes.
Thanks!
Mark Schoonover IS Manager American Geotechnical V: 858-450-4040 - F: 714-685-3909 - C: 858-472-3816
"Stop the Earth!! I want off!!" _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
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?
I'm confused *what* in the world would make you want to write perl for this purpose when two lines of bash would serve the purpose (admirably).
#!/bin/bash /usr/bin/rsync -av --exclude=".*" -e ssh /home/ 192.168.0.22:/home/
If for some reason, you wanted to do something sexier or more dynamic in terms of the source/destination, that would add 4 more lines to make it something like:
#!/bin/bash for dir in 'ls -1 /home/' do /usr/bin/rsync -av --exclude=".*" -e ssh /home/$dir/ 192.168.0.22:/home/$dir/ done
You can even nest loops and iterate multiple parameters.
Peter