rsync, 'uid/gid impossible to set' cases cause future hard link failure, how to fix?

后端 未结 4 773
闹比i
闹比i 2021-01-20 04:18

I am using rsync version 3.1.1 protocol version 31 with cygwin version 2.3.1(0.291/5/3).

I believe that I need to chown all my Win7 files, with unknown uid/gid\'s, w

相关标签:
4条回答
  • 2021-01-20 04:28

    I just added --no-owner --no-group and the message was not shown anymore.

    This then doesn't copy the file owner or group, but when copying from Windows systems this isn't often a problem.

    0 讨论(0)
  • 2021-01-20 04:28

    Use the --usermap and --groupmap rsync options (this requires that both source and dest environments use version 3.1.0 or higher). In my case this won't work since my destination (WD MyCloud) uses 3.0.9.

    OR

    Change the rsync source code with gcc running under cygwin (really not that hard with some C knowledge).

    0 讨论(0)
  • 2021-01-20 04:28

    If you want to keep the ownership/group memberships, you can use the -M --fake-super option to record them as extended attributes. (This has other side-effects that can appear to affect the copied files, all of which are reversible, just as changing symbolic links to regular files.)

    Remember to include the same option when restoring, to recover the saved file metadata.

    0 讨论(0)
  • 2021-01-20 04:43

    Towards man rsync the -a means the same as -rlptgoD and thereby also sets -o (owner) and -g (group).

    So replace -a by -rlptD.

    0 讨论(0)
提交回复
热议问题