Hi Francisco,

On Wed, 25 Feb 2009, Francisco M. Marzoa Alonso wrote:

Chris Wilson escribió:
You need to use --preserve-numerical-ids on the restore command to
restore with the correct ownership.
That does not work neither:

fmmar...@durruti:~$ ls -la test
total 8
drwxr-xr-x  2 fmmarzoa fmmarzoa 4096 2009-02-23 20:07 .
drwxr-xr-x 78 fmmarzoa fmmarzoa 4096 2009-02-25 09:54 ..
-rw-r--r--  1 fmmarzoa devel       0 2009-02-23 20:07 testfile
fmmar...@durruti:~$ rdiff-backup --preserve-numerical-ids test test_backup
fmmar...@durruti:~$ ls -la test_backup
total 12
drwxr-xr-x  3 fmmarzoa fmmarzoa 4096 2009-02-23 20:07 .
drwxr-xr-x 79 fmmarzoa fmmarzoa 4096 2009-02-25 09:56 ..
drwx------  3 fmmarzoa fmmarzoa 4096 2009-02-25 09:56 rdiff-backup-data
-rw-r--r--  1 fmmarzoa fmmarzoa    0 2009-02-23 20:07 testfile
fmmar...@durruti:~$ rm -Rf test
fmmar...@durruti:~$ rdiff-backup -r now --preserve-numerical-ids
test_backup test
fmmar...@durruti:~$ ls -al test
total 8
drwxr-xr-x  2 fmmarzoa fmmarzoa 4096 2009-02-23 20:07 .
drwxr-xr-x 79 fmmarzoa fmmarzoa 4096 2009-02-25 09:57 ..
-rw-r--r--  1 fmmarzoa fmmarzoa    0 2009-02-23 20:07 testfile
fmmar...@durruti:~$

:-(

As Damon Timm pointed out, preserving any kind of ownership does not work when you run the restore as a non-root user. Unix does not allow non-root users (including rdiff-backup when run on your behalf) to change the owner of files. They will always be owned by the user that you are running as. If you run the restore as root, then ownership should be preserved either by name or by UID.

Cheers, Chris.
--
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
_______________________________________________
rdiff-backup-users mailing list at [email protected]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Reply via email to