modification times questions

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

modification times questions

Samba - rsync mailing list
How do I transfer just the modification times with rsync? I now the file content is the same but the modification times are different. Is there a way to do this? Every way that I have tried causes the whole file to transfer as well.

Thanks

--
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: modification times questions

Samba - rsync mailing list
If you are sure the content is correct you can run rsync with both
--times and --size-only.

This will cause rsync to "fix" the timestamps on files that are the same
size on both ends.

On 04/07/2017 02:53 PM, McDowell, Blake via rsync wrote:
> How do I transfer just the modification times with rsync? I now the file
> content is the same but the modification times are different. Is there a
> way to do this? Every way that I have tried causes the whole file to
> transfer as well.
>
> Thanks
>
>

--
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
        Kevin Korb Phone:    (407) 252-6853
        Systems Administrator Internet:
        FutureQuest, Inc. [hidden email]  (work)
        Orlando, Florida [hidden email] (personal)
        Web page: http://www.sanitarium.net/
        PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,


--
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

signature.asc (231 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: modification times questions

Samba - rsync mailing list
I guess I should also mention that if both trees are local you can use:
find . -print -exec touch "/path/to/wrong/times/{}" --reference "{}" \;


On 04/07/2017 02:58 PM, Kevin Korb via rsync wrote:

> If you are sure the content is correct you can run rsync with both
> --times and --size-only.
>
> This will cause rsync to "fix" the timestamps on files that are the same
> size on both ends.
>
> On 04/07/2017 02:53 PM, McDowell, Blake via rsync wrote:
>> How do I transfer just the modification times with rsync? I now the file
>> content is the same but the modification times are different. Is there a
>> way to do this? Every way that I have tried causes the whole file to
>> transfer as well.
>>
>> Thanks
>>
>>
>
>
>
--
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
        Kevin Korb Phone:    (407) 252-6853
        Systems Administrator Internet:
        FutureQuest, Inc. [hidden email]  (work)
        Orlando, Florida [hidden email] (personal)
        Web page: http://www.sanitarium.net/
        PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,


--
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

signature.asc (231 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: modification times questions

Samba - rsync mailing list
In reply to this post by Samba - rsync mailing list
Thank you!

I run --times when I use rsync (I actually use the -a flag) but the times do not transfer over and if I run rsync dryrun with -i I can see that it wants to transfer the files because of times. When I run rsync a second time with your suggestion the times do transfer over. I don't know why...

B
________________________________________
From: rsync [[hidden email]] on behalf of Kevin Korb via rsync [[hidden email]]
Sent: Friday, April 07, 2017 2:58 PM
To: [hidden email]
Subject: Re: modification times questions

If you are sure the content is correct you can run rsync with both
--times and --size-only.

This will cause rsync to "fix" the timestamps on files that are the same
size on both ends.

On 04/07/2017 02:53 PM, McDowell, Blake via rsync wrote:
> How do I transfer just the modification times with rsync? I now the file
> content is the same but the modification times are different. Is there a
> way to do this? Every way that I have tried causes the whole file to
> transfer as well.
>
> Thanks
>
>

--
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
        Kevin Korb                      Phone:    (407) 252-6853
        Systems Administrator           Internet:
        FutureQuest, Inc.               [hidden email]  (work)
        Orlando, Florida                [hidden email] (personal)
        Web page:                       http://www.sanitarium.net/
        PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,


--
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: modification times questions

Samba - rsync mailing list
I have never seen rsync do that.  What exactly are you doing?

On 04/07/2017 03:07 PM, McDowell, Blake wrote:

> Thank you!
>
> I run --times when I use rsync (I actually use the -a flag) but the times do not transfer over and if I run rsync dryrun with -i I can see that it wants to transfer the files because of times. When I run rsync a second time with your suggestion the times do transfer over. I don't know why...
>
> B
> ________________________________________
> From: rsync [[hidden email]] on behalf of Kevin Korb via rsync [[hidden email]]
> Sent: Friday, April 07, 2017 2:58 PM
> To: [hidden email]
> Subject: Re: modification times questions
>
> If you are sure the content is correct you can run rsync with both
> --times and --size-only.
>
> This will cause rsync to "fix" the timestamps on files that are the same
> size on both ends.
>
> On 04/07/2017 02:53 PM, McDowell, Blake via rsync wrote:
>> How do I transfer just the modification times with rsync? I now the file
>> content is the same but the modification times are different. Is there a
>> way to do this? Every way that I have tried causes the whole file to
>> transfer as well.
>>
>> Thanks
>>
>>
>
> --
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
>         Kevin Korb                      Phone:    (407) 252-6853
>         Systems Administrator           Internet:
>         FutureQuest, Inc.               [hidden email]  (work)
>         Orlando, Florida                [hidden email] (personal)
>         Web page:                       http://www.sanitarium.net/
>         PGP public key available on web site.
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
>
--
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
        Kevin Korb Phone:    (407) 252-6853
        Systems Administrator Internet:
        FutureQuest, Inc. [hidden email]  (work)
        Orlando, Florida [hidden email] (personal)
        Web page: http://www.sanitarium.net/
        PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,


--
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

signature.asc (231 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: modification times questions

Samba - rsync mailing list
Transferring files to our NAS over fiber. Nothing unusual...
________________________________________
From: Kevin Korb [[hidden email]]
Sent: Friday, April 07, 2017 3:08 PM
To: McDowell, Blake; [hidden email]
Subject: Re: modification times questions

I have never seen rsync do that.  What exactly are you doing?

On 04/07/2017 03:07 PM, McDowell, Blake wrote:

> Thank you!
>
> I run --times when I use rsync (I actually use the -a flag) but the times do not transfer over and if I run rsync dryrun with -i I can see that it wants to transfer the files because of times. When I run rsync a second time with your suggestion the times do transfer over. I don't know why...
>
> B
> ________________________________________
> From: rsync [[hidden email]] on behalf of Kevin Korb via rsync [[hidden email]]
> Sent: Friday, April 07, 2017 2:58 PM
> To: [hidden email]
> Subject: Re: modification times questions
>
> If you are sure the content is correct you can run rsync with both
> --times and --size-only.
>
> This will cause rsync to "fix" the timestamps on files that are the same
> size on both ends.
>
> On 04/07/2017 02:53 PM, McDowell, Blake via rsync wrote:
>> How do I transfer just the modification times with rsync? I now the file
>> content is the same but the modification times are different. Is there a
>> way to do this? Every way that I have tried causes the whole file to
>> transfer as well.
>>
>> Thanks
>>
>>
>
> --
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
>         Kevin Korb                      Phone:    (407) 252-6853
>         Systems Administrator           Internet:
>         FutureQuest, Inc.               [hidden email]  (work)
>         Orlando, Florida                [hidden email] (personal)
>         Web page:                       http://www.sanitarium.net/
>         PGP public key available on web site.
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
>

--
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
        Kevin Korb                      Phone:    (407) 252-6853
        Systems Administrator           Internet:
        FutureQuest, Inc.               [hidden email]  (work)
        Orlando, Florida                [hidden email] (personal)
        Web page:                       http://www.sanitarium.net/
        PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,


--
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: modification times questions

Samba - rsync mailing list
In reply to this post by Samba - rsync mailing list
Le 2017-04-07 21:08, Kevin a écrit :

> On 04/07/2017 03:07 PM, McDowell, Blake wrote:
>
>> I run --times when I use rsync […] but the times do not transfer over
>> […]
>
> I have never seen rsync do that.  What exactly are you doing?

I have seen such a behaviour when trying to rsync to a UDF volume
mounted on a Mac.

It was due to rsync's receiver doing the file renamings from their
temporary (transfer) name to the real one after having done all other
operations, including having modified the timestamps; turned out that
UDF implementation in Darwin sees name changes as file changes, and as
such, renaming the file modified the mtime.

Perhaps doing --inplace can prevent this behaviour (if, Blake, you have
the same).

I opted for patching rsync:
http://tmp.outters.eu/rsync.modtime_after_rename.patch
On the very first renamed file, the patched rsync rereads the file's
mtime, and if it finds it doesn't match the one set, it switches to the
mtime-after-rename behaviour (for the rest of the transfer).

--
Guillaume

--
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
Loading...