LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-12-2011, 08:46 AM   #1
jjj0923
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Rep: Reputation: Disabled
rsync with scp behavior


I'm running :

rsync -r -v -e ssh root@nn.nn.nn.nn:/usr/local/websites/* /usr/local/websites

and each time I run it it copies everything - all files. I thought rsync was only supposed to copy files that had been added or modified.

thanks in advance for any help.
 
Old 07-12-2011, 08:49 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Did you try with -u option (update)? From the man page,
Quote:
-u, --update
This forces rsync to skip any files which exist on the destina-
tion and have a modified time that is newer than the source
file. (If an existing destination file has a modify time equal
to the source file's, it will be updated if the sizes are dif-
ferent.)
Another one which you might be interested in is the --ignore-existing, if you're not into updating at all.

Last edited by b0uncer; 07-12-2011 at 08:55 AM.
 
Old 07-12-2011, 08:54 AM   #3
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,267

Rep: Reputation: 298Reputation: 298Reputation: 298
The --ignore-existing doesn't update changed files. Without the -t option, rsync will compare all the files, which can be as slow as copying them. Just add the -a option, which is the same as -rlptgoD.
 
1 members found this post helpful.
Old 07-12-2011, 09:22 AM   #4
jjj0923
LQ Newbie
 
Registered: Jun 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Guttorm View Post
The --ignore-existing doesn't update changed files. Without the -t option, rsync will compare all the files, which can be as slow as copying them. Just add the -a option, which is the same as -rlptgoD.

cool - that worked - thanks you - kudos given.
 
  


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
rsync behavior with symlinks keviny22 Linux - Software 2 02-28-2011 01:59 PM
SCP or rsync? centosfan Linux - General 4 01-09-2011 09:02 PM
[SOLVED] rsync -z vs. scp ... which one is faster over network? someshpr Linux - General 5 12-08-2010 07:06 PM
can't understand rsync's behavior at all baronsam Linux - Software 5 08-15-2006 02:46 PM
Bizzare 'scp' behavior gw1500se Mandriva 2 10-20-2005 06:01 PM


All times are GMT -5. The time now is 12:43 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