Can rsync detect changes in owner/group or perms

rsync

Can rsync be used to create and maintain an exact copy of a filesystem remotely, detecting owner or group or permission changes too?

My current "rsync –del –numeric-ids -a something/ root@host:/somewhere/" only syncs by time or (or –checksum). If, say, only owner changes nothing is syncd. The workaround is to delete everything and resync, wearing out the targets flash storage.

If not, is there another way?

My goal is to be able to have networked hdd with that is an exact duplicate and can simply be plugged into the source machine in the event of a device/fs failure, or (my main reason) to sync an embedded os accross the network that has had only minor (but numerous untracked) tweeks.

EDIT: Original command used root@host not user@host

Best Answer

Check out this similar question.

You can use the following flags to preserve that specific information:

-p Preserve permissions

-o Preserve owner

-g Preserve group

-X Preserve Extended Attributes

-A Preserve File ACLs

Related Question