Skip to content

honour --update for symbolic links #141

Open

Description

@twojstaryzdomu

rsync 3.2.3 will only copy, not update, symbolic links, without regard to their timestamps on the receiving end. There is no option to support preserving more recent links with '--update' on the receiving end.
I'm using symbolic links to 'black out' links by linking to /dev/null in a repository that includes files that have to be deleted.
The problem is more recent symbolic links on the target tend to get overwritten when a source running an update transfer overwrites the newer symbolic link with a prior, less recent copy of (by link's mtime) symbolic link. I find no option to honour the mtime of the newer symbolic link during an update transfer. Symbolic link time stamps on modern file systems are well supported and no different from regular files.
Please add an option that would have ' --update' behave for symbolic links exactly like for regular files i.e. skip source links if their target counterpart is newer (by mtime).

Activity

  1. twojstaryzdomu commented on Jul 3, 2021

    @twojstaryzdomu
    ContributorAuthor

    The PR #198 fixes this issue, albeit with a slight change.
    Due to the risk of impacting the existing behaviour of the '--update' switch, which some users may rely on or find convenient, the symlink update mode is enabled independently via the '--update-links' switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions