The easiest way to restore timestamps of files?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The easiest way to restore timestamps of files?

Frantisek Hanzlik
Please, is possible (with rsync) re-create files timestamps?
I mean something like choosing a "-T" in the program mirror- from
it's man page e.g. there:
http://sunsite.univie.ac.at/textbooks/mirror/mirror.html#Flags

"Do not do any file transfers just force the time-stamps of any local
files to be reset to be the same as the remote files. Normally only
used when initialising a mirror that already contains files retrieved
another way (e.g. from CDROM)."

This is the situation I have encountered several times - I have local
files which was downloaded from internet archive via FTP or obtained
somehow, these files have bad timestamp, and now I want use rsync for
their synchronization with the remote rsync server and also correct
their bad timestamp - of course without re-downloading. Is it possible?
--
Thanks in advance, Franta Hanzlik

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

Re: The easiest way to restore timestamps of files?

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

- --archive --itemize-changes --size-only --dry-run
Obviously the last one is so you can confirm what it is going to do.

On 04/26/2015 06:08 PM, Frantisek Hanzlik wrote:

> Please, is possible (with rsync) re-create files timestamps? I mean
> something like choosing a "-T" in the program mirror- from it's man
> page e.g. there:
> http://sunsite.univie.ac.at/textbooks/mirror/mirror.html#Flags
>
> "Do not do any file transfers just force the time-stamps of any
> local files to be reset to be the same as the remote files.
> Normally only used when initialising a mirror that already contains
> files retrieved another way (e.g. from CDROM)."
>
> This is the situation I have encountered several times - I have
> local files which was downloaded from internet archive via FTP or
> obtained somehow, these files have bad timestamp, and now I want
> use rsync for their synchronization with the remote rsync server
> and also correct their bad timestamp - of course without
> re-downloading. Is it possible?
>

- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
        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.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlU9bp8ACgkQVKC1jlbQAQcgBwCg4I0VpJfxWYWCBiLJo2qKMWpj
6ooAoJIqtmC6juv7KmqHSCWeUtRielEE
=mumk
-----END PGP SIGNATURE-----
--
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
|

Re: The easiest way to restore timestamps of files?

Frantisek Hanzlik
Kevin Korb wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> - --archive --itemize-changes --size-only --dry-run
> Obviously the last one is so you can confirm what it is going to do.
>
> On 04/26/2015 06:08 PM, Frantisek Hanzlik wrote:
>> Please, is possible (with rsync) re-create files timestamps? I mean
>> something like choosing a "-T" in the program mirror- from it's man
>> page e.g. there:
>> http://sunsite.univie.ac.at/textbooks/mirror/mirror.html#Flags
>>
>> "Do not do any file transfers just force the time-stamps of any
>> local files to be reset to be the same as the remote files.
>> Normally only used when initialising a mirror that already contains
>> files retrieved another way (e.g. from CDROM)."
>>
>> This is the situation I have encountered several times - I have
>> local files which was downloaded from internet archive via FTP or
>> obtained somehow, these files have bad timestamp, and now I want
>> use rsync for their synchronization with the remote rsync server
>> and also correct their bad timestamp - of course without
>> re-downloading. Is it possible?

Hi Kevin,
thanks for your help, it works. My mistake was that I thought that
the use of the '--size-only' switch will not repair file timestamps.

Now I still do not understand why does not work this switch form:

--chmod=D=775,F=664

(it causes error message:
rsync: Invalid argument passed to --chmod (D=775,F=664)
rsync error: syntax or usage error (code 1) at main.c(1554) [client=3.1.0]
). But it isn't too big problem, as form:

--chmod=Dug=rwx,Do=rx,Fug=rw,Fo=r

works well. It seems as compatibility with chmod syntax isn't perfect
and rsync man page not clearly mentioned this.

Thanks again, Franta Hanzlik

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

Re: The easiest way to restore timestamps of files?

Francis.Montagnac-2

Hi
On Wed, 29 Apr 2015 14:23:56 +0200 Frantisek Hanzlik wrote:

> Now I still do not understand why does not work this switch form:

> --chmod=D=775,F=664

This is not the proper syntax: suppress the = signs before the modes:

--chmod=D775,F664

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