Operating System - HP-UX
1833788 Members
2318 Online
110063 Solutions
New Discussion

Preserving ownership during rsync

 
Chern Jian Leaw
Regular Advisor

Preserving ownership during rsync

Is there way which rsync could preserve the ownership of filesystems transferred between remote sites, having different NIS servers? Owners of a filesystem exists on both remote sites, and have different uid, and possibly the same or different uname on both sites.

If there is an option, could someone show it to me, please?
3 REPLIES 3
steven Burgess_2
Honored Contributor

Re: Preserving ownership during rsync

Chern

I have never used rsync,but have found the following webpage

http://rsync.samba.org

Have a look , it has an FAQ area , plus documentation

Regards

Steve
take your time and think things through
Chern Jian Leaw
Regular Advisor

Re: Preserving ownership during rsync

Steve,
Thanks.
Brian Markus
Valued Contributor

Re: Preserving ownership during rsync

I used RDIST to do system syncs on a few of my systems. With the -M option , it will Check ownership/groups and make sure they are the same.

I have a .rdistfile on each host with the parm's and files/dirs I want synced, then in cron I have the times I want it to sync.

Here's a modified version of what I use. It emails the sync results. :)

.rdistfile
------------------------------

DIR = ( /dir_to_sync )
USERS = ( bmarkus@rcoe.k12.ca.us )
${DIR} -> ${HOSTS}
install -R;
notify ${USERS};
-------------------------------

Here's what I threw in cron
--------------------------------

0,15,30,45 * * * * /usr/bin/rdist -f ~userdir/.rdistfile 2>&1




Hope this helps

Brian.
When a sys-admin say's maybe, they don't mean 'yes'!