Rsync keeps copying everything to the server

Kevin Korb kmk at sanitarium.net
Thu Oct 2 11:01:54 MDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --size-only should only be used if you are certain your files that are
the same size are actually the same.  This is usually used when you
have accidentally used a copying method that doesn't copy the
timestamps and you just want to fix the timestamps.

The problem here appears to be that your timestamps either aren't
copying or are being set incorrectly.  That is what I would be
attacking because you really have no idea when --size-only will miss
something that just happens to be the same side.

First try comparing your mtime timestamps yourself.  The stat command
will give you the whole thing.  See how different they are after rsync
runs when they should be the same.  Try manually setting a specific
timestamp with the touch command and see if the NAS does something
strange with them.

It copied the whole file because as we discussed before, rsync isn't
networking so it is stuck in --whole-file.

On 10/02/2014 11:37 AM, Juan Carlos Valle Sandoval wrote:
> I have changed the script to:
> 
> rsync.exe -ai --size-only --progress 
> --log-file=/cygdrive/v/notes/archive/RSyncLogFile.txt 
> /cygdrive/d/%username%/notes/archive /cygdrive/v/notes/
> 
> The output is:
> 
> 2014/10/02 10:25:49 [5088] >f.st...... archive/file1.nsf 2014/10/02
> 10:25:54 [5088] sent 4073663746 bytes  received 41 bytes total size
> 9589227520
> 
> 
> The result:
> 
> Only the modified file was backed up. However the whole file was
> copied, not just the new things. :-(
> 
> If I could improve this should be excellent. :-)
> 
> On Thu, Oct 2, 2014 at 9:14 AM, Juan Carlos Valle Sandoval 
> <jcvalle.ni at gmail.com <mailto:jcvalle.ni at gmail.com>> wrote:
> 
> Hi
> 
> 2014/10/02 09:09:16 [2124] >f..t...... Folder/file.doc 2014/10/02
> 09:12:41 [2124] >f..t...... Folder/file2.doc 2014/10/02 09:15:38
> [2124] >f..t...... Folder/file3.doc
> 
> This is the result of the output with --itemize-changes. Does it 
> mean that rsync is finding a different in the timestamp?
> 
> What if I use *--size-only? Should it work?*
> 
> 
> 
> On Wed, Oct 1, 2014 at 9:16 PM, Kevin Korb <kmk at sanitarium.net 
> <mailto:kmk at sanitarium.net>> wrote:
> 
> You really won't know anything until you get the itemize output.
> But in the end, if rsync isn't doing the networking then it isn't
> any better than cp -au.  In fact it is significantly slower.  And 
> that is when you aren't stuck Cygwin.
> 
> On 10/01/2014 09:54 PM, jcvalle.ni at gmail.com 
> <mailto:jcvalle.ni at gmail.com> wrote:
>> Do i need to have a rsync server to make this work? Honestly i
>> was thinking it was the easiest way to use rsync in my
>> environment. The purpose is to make a backup to the v:\ drive on
>> a Windows server from my documents during the logoff time. The
>> issue is I can not install anything on the server because
>> corporate policies. Any advice? You have more experience maybe
>> can Share good options to make this implementation. Thanks in
>> Advance
> 
>> Enviado desde mi iPod
> 
>> El 01/10/2014, a las 07:58 p.m., Kevin Korb <kmk at sanitarium.net
>> <mailto:kmk at sanitarium.net>> escribió:
> 
>> That doesn't matter.  You are talking to it as a local path
>> (what network mounting does).  Therefore you are stuck in
>> --whole-file.
> 
>> If whatever you are rsyncing to supports either rsync over ssh
>> or straight rsync then you can use user at host:/path or
>> host::module instead of the local network mount path.
> 
>> On 10/01/2014 08:56 PM, jcvalle.ni at gmail.com
> <mailto:jcvalle.ni at gmail.com> wrote:
>>>>> One is local, the other is a network drive
>>>>> 
>>>>> Enviado desde mi iPod
>>>>> 
>>>>> El 01/10/2014, a las 07:15 p.m., Kevin Korb 
>>>>> <kmk at sanitarium.net <mailto:kmk at sanitarium.net>> escribió:
>>>>> 
>>>>> --itemize-changes will tell you the why.  The fact that
>>>>> both of your paths are local is why you are stuck with 
>>>>> --whole-file.
>>>>> 
>>>>> On 10/01/2014 08:14 PM, Juan Carlos Valle Sandoval wrote:
>>>>>>>> Hi mates
>>>>>>>> 
>>>>>>>> I am running this command and rsync keeps copying
>>>>>>>> all the files to the server. Any reason why? It
>>>>>>>> supposed to copy only those files with have been
>>>>>>>> modified and just copy the difference.
>>>>>>>> 
>>>>>>>> Thanks for your advice
>>>>>>>> 
>>>>>>>> rsync.exe -av --progress 
>>>>>>>> --log-file=/cygdrive/v/notes/archive/RSyncLogFile.txt
>>>>>>>>
>>>>>>>> 
/cygdrive/d/%username%/notes/archive
>>>>>>>> /cygdrive/v/notes/
>>>>> 
>>>>>> -- Please use reply-all for most replies to avoid
>>>>>> omitting the mailing list. To unsubscribe or change
>>>>>> options: https://lists.samba.org/mailman/listinfo/rsync
>>>>>> Before posting, read: 
>>>>>> http://www.catb.org/~esr/faqs/smart-questions.html
> 
> 
> 
> 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlQthQIACgkQVKC1jlbQAQflzwCg7v0wHaqdsN5nMAj8Us84T9Pi
glIAoK14xnLgpjXbuQFPOQrLOtjoF4F0
=Zsef
-----END PGP SIGNATURE-----


More information about the rsync mailing list