"sudo rsync -avuzogqb --backup-dir" permissions lost to root
I'm synchronising a few directories every day and everything works fine except for the changed files that go to the backupdir. All permissions for these files and directories are changed to root, even though -og is specified.
This is the command:
"sudo rsync -avuzogqb --numeric-ids --delete-after --backup-dir ${backupdir} --rsh='ssh' ${host}:${source} ${target}"
How can i keep permissions for backup directories?
|