rsync - used incorrect multiple paths format, unsure of resulting source/destination
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
rsync - used incorrect multiple paths format, unsure of resulting source/destination
Hi,
I used the following rsync command:
rsync -raEz --progress -e ssh --delete --exclude=.svn /var/www/application host:/var/www/ /var/www/application/html/group1/images/products /var/www/application/html/group1/images/company
This is the summary that was displayed at the end:
sent 249326544 bytes received 542026 bytes 1423752.54 bytes/sec
total size is 339503218 speedup is 1.36
rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
Can anyone explain to me what the result was and where I should look for the files/folders that were sent?
I used the following rsync command:
rsync -raEz --progress -e ssh --delete --exclude=.svn /var/www/application host:/var/www/ /var/www/application/html/group1/images/products /var/www/application/html/group1/images/company
This is the summary that was displayed at the end:
sent 249326544 bytes received 542026 bytes 1423752.54 bytes/sec
total size is 339503218 speedup is 1.36
rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
Can anyone explain to me what the result was and where I should look for the files/folders that were sent?
Thanks,
Joe
Wow.
I believe you will find that the contents of these directories:
You are spot on, the first three paths were copied to the final path.
Yes, "Wow". I could have caused some major damage. It will be a long time before I fail to check the man pages. No more flying by the seat of my pants.
You are spot on, the first three paths were copied to the final path.
Yes, "Wow". I could have caused some major damage. It will be a long time before I fail to check the man pages. No more flying by the seat of my pants.
I was adding to an existing script and wanted to exclude the last two paths from the syncing process. I saw the exclude option followed by paths and in a rush I guessed that I was looking at a space delimited command:
--exclude=.svn /var/www/application host:/var/www/ /var/www/application/html/group1/images/products /var/www/application/html/group1/images/company
I was adding to an existing script and wanted to exclude the last two paths from the syncing process. I saw the exclude option followed by paths and in a rush I guessed that I was looking at a space delimited command:
--exclude=.svn /var/www/application host:/var/www/ /var/www/application/html/group1/images/products /var/www/application/html/group1/images/company
Joe
You'll need an --exclude= for each path. If I wanted to sync /var/ to /backups/ and exclude /var/log and /var/lib I would:
The excludes are relative to the directory you are backing up... if you are backing up /var/ just imagine that an exclude statement invisibly already says --exclude '/var/' so all you have to add is the 'log'
Last edited by szboardstretcher; 03-24-2011 at 11:58 AM.
The excludes are relative to the directory you are backing up... if you are backing up /var/ just imagine that an exclude statement invisibly already says --exclude '/var/' so all you have to add is the 'log'
Good Followup @szboardstretcher,
When I ran the incorrect command and saw way too many files being copied, I took the time to research the use of the rsync. I modified the script in the manner you suggest and it worked correctly, only updating the few files that had been modified on the source server.
I didn't think of it earlier, but it would be helpful if I posted the correct version of the script in case someone comes across this thread when looking for help. Here's the correct version to exclude the two image folders as I had originally intended:
rsync -raEz --progress -e ssh --delete --exclude=.svn --exclude 'html/group1/images/products' --exclude 'html/group1/images/company' /var/www/application host:/var/www/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.