Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rsync several files from one command string

Status
Not open for further replies.

dUbbsNIX

MIS
Jul 10, 2003
70
GB
Hi,

I am using rsync through ssh to copy various directories and files to a DR server. Consider some of the script that is running;

done
for HOST in ${TARGET_LIST}
do
/usr/local/bin/rsync -e ssh -avz --rsync-path=/usr/local/bin/rsync --blocking-io --delete /etc/ftpusers/ ${HOST}:/DR/etc/ftpusers
done
for HOST in ${TARGET_LIST}
do
/usr/local/bin/rsync -e ssh -avz --rsync-path=/usr/local/bin/rsync --blocking-io --delete /etc/servername.hme0/ ${HOST}:/DR/etc/Servername.hme0
There are a bunch of files in /etc that I wish to copy but also a bunch I wish to leave alone. Am I able to do this on one line. There are too many files in /etc to use include / exclude. But I don't really want a seperate line for every /etc file.

Is this possible?

thanks,

Dubbs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top