character devices
Michal Ruprich
michalruprich at gmail.com
Fri Jun 26 09:54:29 UTC 2020
Hi,
I was running a couple of tests on the latest rsync and noticed a
different behavior when it comes to character devices. The test creates
a character device on the client side and a simple text file on the
server side. When copying from server to the client, previously the
character device would get changed to a regular text file after the
transaction but with new rsync, the character device is still a
character device.
Before:
# ls -l /var/tmp/client
crw-rw-rw-. 1 root root 1, 0 Jun 26 05:41
character.device
# ls -l /home/rsynctestuser/rsyncdata
-rw-r--r--. 1 root root 12 Jun 26 05:41
character.device
# rsync --perms --owner --group --times --update --recursive
<server_address>::my_data /var/tmp/client
# ls -l /var/tmp/client
-rw-r--r--. 1 root root 12 Jun 26 05:46
character.device <--- the file has changed to a text file
After:
# ls -l /var/tmp/client/
crw-rw-rw-. 1 root root 1, 0 Jun 26 05:46
character.device
# ls -l /home/rsynctestuser/rsyncdata
-rw-r--r--. 1 root root 12 Jun 26 05:46
character.device
#rsync --perms --owner --group --times --update --recursive
<server_address>::my_data /var/tmp/client
# ls -l /var/tmp/client
crw-rw-rw-. 1 root root 1, 0 Jun 26 05:46
character.device <--- no change in the type of file
I tried to run the newer version with --write-devices but manpage says:
"This option is refused by an rsync daemon.". I am trying to find out
what is the correct behavior in this case. Was the assumption that the
character device would change with the older version wrong? Is there a
way how to let the server rewrite the file? I tried the 'refuse options'
statement in the rsyncd.conf but no luck.
I would truly appreciate any ideas about this.
Thanks and regards,
Michal Ruprich
More information about the rsync
mailing list