I can copy linux device files without any error this way:
rsync --recursive --links --perms --times --group --owner --devices --specials --xattrs --acls --stats /path/to/dev root@MACHINE:/path/to/bkps/
but I get a lot of errors of the kind
skipping non-regular file "dev/audio"
when I do it like this:
rsync --recursive --links --perms --times --group --owner --devices --specials --xattrs --acls --stats /path/to/dev rsync://root@MACHINE/MODULE/
where rsync on MACHINE is running in daemon-mode and its rsyncd.conf contains the following configs:
lock file = /var/run/rsync.lock
pid file = /var/run/rsyncd.pid
log file = /var/log/rsyncd.log
strict modes = true
uid = UID_TO_SET
gid = GID_TO_SET
read only = no
list = yes
[MODULE]
path = /path/to/bkps/
The only difference in the above commandlines is the destination path:
root@MACHINE:/path/to/bkps/
vs.
rsync://root@MACHINE/MODULE/
Can anybody help me solve this problem? Thanks
The daemon and module must be uid root for --owner or --devices to work. It's not clear from your rsyncd.conf what the value of uid and gid are. Just because your user is named root doesn't mean the daemon or module are running with root privileges.
Additionally, you can replace the following args:
--recursive --links --perms --times --group --owner --devices --specials
with -a or --archive, which is an alias for all of those.
Thanks to Matt for his input, and after some more manual-reading and testing I could solve the problem:
The UID and GID directives in rsyncd.conf specified unprivileged, "normal" users/groups indeed, because I thought these directives are to set the user/group of the copied data
And as the rsync-daemon is started by the system on start-up, I thought it was running as root anyway