--no-omit-dir-times does not override --backup

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

--no-omit-dir-times does not override --backup

Samba - rsync mailing list
Greetings rsync gurus,

As I understand the documentation "--backup" without specifying "--backup-dir" implicitly sets "--omit-dir-times".
It is then possible to negate the implied option by specifying it prefixed with "--no".
The resulting option "--no-omit-dir-times" runs without any warnings or errors but does not transfer modification times on directories.

Example rsync command:
rsync --recursive --times --backup --no-omit-dir-times source_tree dest

Expected result:
rsync transfer modification times on directories.
or
Unknown option/syntax error message when executing the command.

Is this expected behavior or am I doing something wrong?
Thanks for your attention.
--
Anders
--
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: --no-omit-dir-times does not override --backup

Samba - rsync mailing list
On Sat, Sep 16, 2017 at 10:13 AM, Anders Gronberg via rsync <[hidden email]> wrote:
As I understand the documentation "--backup" without specifying "--backup-dir" implicitly sets "--omit-dir-times".
It is then possible to negate the implied option by specifying it prefixed with "--no".

No, it is not possible to override that. The backup operations occurring inside the transfer directories cause the directory times to get tweaked, so rsync doesn't support trying to keep those times the same (without moving your backup files elsewhere). There is no error because --no-omit-dir-times is the default, and rsync expects to override that default. Yes,, it would be possible to make rsync complain with more a complicated option setup, but I don't think that the extra complexity is warranted for this. I've tweaked the man page to mention that it is forced on.
..wayne..

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