From: Andy <an...@be...> - 2005-12-05 10:24:17
|
Craig Barratt wrote: > Les Mikesell writes: > >> On Fri, 2005-12-02 at 10:16, Andy wrote: >> >>> I have downloaded and restored the tar archive from the most recent >>> backup, this time using the -p option to preserve permissions: >>> >>> ~# tar xpvf restore.tar >>> >>> Yet when I list the restored directory I still see differing UIDs and GIDs: >> >> Tar will try to match the user name to the current password/nis/ldap >> lookup during a restore unless you use the --numeric-owner option. >> Perhaps you have a duplicate passwd entry for postgres and it is >> finding the wrong one when restoring. > > That's right. The tar archive includes the uid/gid, but also includes > the uname and gname. When BackupPC_tarCreate runs, it uses the correct > uid/gid, but it adds the uname and gname based on the local (BackupPC > server) machine, since it doesn't know the correct uname and gname from > the client (that's not sent). So it is likely that the uid/gid are > different on the BackupPC server and client. > > All that should be solved by using --numeric-owner on the tar > extract, and similarly --numeric-ids on the rsync restore > (that's the default in config.pl). > > Craig Thanks very much Les and Craig. I now understand that I need to use the --numeric-owner option, and why. Andy |