LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-24-2011, 12:04 PM   #1
codewaggle
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
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?

Thanks,
Joe
 
Old 03-24-2011, 12:07 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,211

Rep: Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612
Quote:
Originally Posted by codewaggle View Post
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?

Thanks,
Joe
Wow.

I believe you will find that the contents of these directories:

Quote:
/var/www/application
host:/var/www/
/var/www/application/html/group1/images/products
Have been copied to here:

Quote:
/var/www/application/html/group1/images/company

Last edited by szboardstretcher; 03-24-2011 at 12:09 PM.
 
1 members found this post helpful.
Old 03-24-2011, 12:29 PM   #3
codewaggle
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks @szboardstretcher,

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.

Joe
 
Old 03-24-2011, 12:37 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,211

Rep: Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612
Quote:
Originally Posted by codewaggle View Post
Thanks @szboardstretcher,

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.

Joe
Welcome. What were you trying to do?
 
Old 03-24-2011, 12:49 PM   #5
codewaggle
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by szboardstretcher View Post
Welcome. What were you trying to do?
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
 
Old 03-24-2011, 12:56 PM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,211

Rep: Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612Reputation: 1612
Quote:
Originally Posted by codewaggle View Post
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:

Code:
rsync -varhz --progress --delete --exclude 'log' --exclude 'lib' /var/ /backups/
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 12:58 PM.
 
1 members found this post helpful.
Old 03-24-2011, 01:15 PM   #7
codewaggle
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by szboardstretcher View Post
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:

Code:
rsync -varhz --progress --delete --exclude 'log' --exclude 'lib' /var/ /backups/
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/

Thanks Again,
Joe
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy files from one source to multiple destination simultaneously mdfakkeer Linux - Software 3 08-10-2010 04:25 PM
copy files from one source to multiple destination simultaneously mdfakkeer Programming 7 08-06-2010 08:05 AM
Incorrect source/destination ports when reading tcpdump data with libpcap Nylex Programming 2 06-21-2007 05:10 AM
Incorrect destination addy on subnet traffic af_dave Linux - Security 5 08-29-2004 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration