JeffBeall
asked on
unix rsync
I have a HPUX server and finally got rsync installed on it. so i tried running
rsync -av /source /destination
/source = a directory on the HPUX box - /destination = NFS share mounted on HPUX box. and i get this message
rsync: chown "/destination/.filename" failed : not owner (1)
i looked at the man file for rsync and -a = -rlptgoD - so i substituded -rlptg for -a and rsync runs fine. so according to the man page -o is preserve owner and -D is devices
So i figured devices isn't something to worry about ( i guess )
so my question is what are the repercussions of not using -o ? i assume i wouldn't preserve the owner - since I am backing up using rsync to a different computer - is it even possible to preserve the owner?
rsync -av /source /destination
/source = a directory on the HPUX box - /destination = NFS share mounted on HPUX box. and i get this message
rsync: chown "/destination/.filename" failed : not owner (1)
i looked at the man file for rsync and -a = -rlptgoD - so i substituded -rlptg for -a and rsync runs fine. so according to the man page -o is preserve owner and -D is devices
So i figured devices isn't something to worry about ( i guess )
so my question is what are the repercussions of not using -o ? i assume i wouldn't preserve the owner - since I am backing up using rsync to a different computer - is it even possible to preserve the owner?
If the destination host doesn't has the same user account, it will should the uid. It means that -o preserve the uid.
Since you use NFS mount, so it doesn't matter.
Since you use NFS mount, so it doesn't matter.
ASKER
so, shouldn't it work to setup a user on my destination machine with the same uid as the source then the -o should work?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
thanks for the help. it turns out that my software company said that as long as the group is a certain group then everything will work. so i'll just run rsync, and not care what group is on the backup pc, then if i need to
sudo chgrp -r groupname /Directory
all done.
sudo chgrp -r groupname /Directory
all done.
"This option causes rsync to set the owner of the destination file to be the same as the source file, but only if the receiving rsync is being run as the super-user (see also the --super
and --fake-super options). Without this option, the owner of new and/or transferred files are set to the invoking user on the receiving side.
The preservation of ownership will associate matching names by default, but may fall back to using the ID number in some circumstances (see also the --numeric-ids option for a full
discussion)."
The last paragraph in my opinion makes preserving the ownership possible but unreliable in practice unless you have identical sets of users on both computers.