rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] User/Group Permissions Question - IS THIS A BU


From: Damon Timm
Subject: Re: [rdiff-backup-users] User/Group Permissions Question - IS THIS A BUG?
Date: Wed, 25 Feb 2009 09:57:22 -0500

Although this doesn't address the --preserve-numberical-ids issue ...
What I am doing for now, is backing up using root -- which *does*
preserve the correct user:group name of the files (rather than when I
backup as just an ordinary user ... which changes the user:group to
the ordinary user and doesn't preserve) ... then, for now anyway, I am
just doing:

find /path/rdiff-backup-data/ -type d -exec chmod 755 {} \;
find /path/rdiff-backup-data/ -type f -exec chmod 644 {} \;

This brings in read permissions and archfs seems to work okay ... I am
less concerned, I guess, about restoring the exact permissions of the
file ... that seems easy enough to fix.  For me, the convenience of
being able to browse with an archfs mount certainly outweighs
everything else.

Am interested to see what comes of Francisco's investigations!

Damon

On Tue, Feb 24, 2009 at 5:26 PM, Chris Wilson <address@hidden> wrote:
> Hi Francisco,
>
> On Mon, 23 Feb 2009, Francisco M. Marzoa Alonso wrote:
>
>> It seems like --preserve-numerical-ids option isn't working right on
>> rdiff-backup, or perhaps we're missundestading how it works, because I
>> can reproduce the problem you say, and it's not preserving uid and gid
>> as it should, according to 'man rdiff-backup'. Even using "rdiff-backup
>> -r now" it does NOT recover uid:gid original ownership. See this:
>>
>> address@hidden:~$ ls -al test
>> total 8
>> drwxr-xr-x  2 fmmarzoa devel    4096 2009-02-23 20:07 .
>> drwxr-xr-x 77 fmmarzoa fmmarzoa 4096 2009-02-23 20:07 ..
>> -rw-r--r--  1 fmmarzoa devel       0 2009-02-23 20:07 testfile
>>
>> I've a directory called "test" with uid:gid as fmmarzoa:devel, and a
>> testfile within the directory with same ownership. Now I backup it with:
>>
>> address@hidden:~$ rdiff-backup --preserve-numerical-ids test test_backup
>> address@hidden:~$ ls -la test_backup
>> total 12
>> drwxr-xr-x  3 fmmarzoa fmmarzoa 4096 2009-02-23 20:07 .
>> drwxr-xr-x 78 fmmarzoa fmmarzoa 4096 2009-02-23 20:10 ..
>> drwx------  3 fmmarzoa fmmarzoa 4096 2009-02-23 20:10 rdiff-backup-data
>> -rw-r--r--  1 fmmarzoa fmmarzoa    0 2009-02-23 20:07 testfile
>>
>> So in fact, ownership information has been lost. Obviously restoring just
>> doing a "cp test_backup test" will not recover the ownership data, but
>> restore command neither!:
>>
>> address@hidden:~$ rdiff-backup -r now test_backup test
>> address@hidden:~$ 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-23 20:12 ..
>> -rw-r--r--  1 fmmarzoa fmmarzoa    0 2009-02-23 20:07 testfile
>
> You need to use --preserve-numerical-ids on the restore command to restore
> with the correct ownership. As far as I know, rdiff-backup stores both
> uid/gid and corresponding names in the metadata file, so it can restore
> using numeric or named UIDs. I guess that using named UIDs in the repository
> instead of numeric ones is a bug.
>
> 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 |
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]