OK, I have a client (booker) and server (fourroses).
I want to run a script on booker that uses rsync to copy files to fourroses and keep all user and group ownership attributes the same.
I have had success maintaining file attributes running rsync in regular instead of daemon mode. But I need this to run as a script (ultimately a cron job) and so the rsync command needs the '--password-file' option which can only be used when running rsync in daemon (i.e. '::') mode.
The command in the script that is run from the client machine is:
Is there something I can change to maintain user and group ownership after the transfer?
I want to run a script on booker that uses rsync to copy files to fourroses and keep all user and group ownership attributes the same.
I have had success maintaining file attributes running rsync in regular instead of daemon mode. But I need this to run as a script (ultimately a cron job) and so the rsync command needs the '--password-file' option which can only be used when running rsync in daemon (i.e. '::') mode.
- Both machines are on the same LAN.
- I have root access on both machines.
- My user (wyatt) is present on both machines and even has the same user and home group ids on both machines.
- The rsync daemon is running on the server.
log file = /var/log/rsyncd.log
uid = wyatt
gid = wyatt
[bookermirror]
path = /shares/
read only = no
list = yes
auth users = wyatt
secrets file = /home/wyatt/scripts/pw.txt
The command in the script that is run from the client machine is:
rsync -rlpgotvO --delete --password-file=/home/wyatt/scripts/pw.txt /shares/ wyatt@fourroses.whiskey::bookermirror
Is there something I can change to maintain user and group ownership after the transfer?