Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] backup using rsync and file permission

Just an extra to Scotts post

UNIX keeps UID/GID as numbers.

It is polite for ls to go and look in /etc/passwd and /etc/group and replace
the numbers with the text for us humans.  You can see this by doing a
"ls -aln".  This can be a problem when you copy them to another system (NFS
has this problem too).  Unless the username/group coressponds to the same
number, files magically belong to someone else after copying.  As
administrator, you will need to keep UID/GID consistent between the two

Also, try using the --delete switch on rsync if you are intending to keep an
exact mirror.  The --delete switch will delete the files on the target if
they have been deleted on the source.

I use "rsync -avz --delete sourcehost:directory/ directory" to do a suck