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


From: Francisco M. Marzoa Alonso
Subject: Re: [rdiff-backup-users] User/Group Permissions Question
Date: Mon, 23 Feb 2009 19:12:08 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Damon Timm escribió:
> Hi - I want to run rdiff-backup from cron as root to backup all user
> folders under /home/ -- this works fine, however, I am having trouble
> with ownership of files ...
>
> If I run rdiff-backup as root, the "rdiff-backup-data" is also owned
> by root -- this means I have to *be* root in order to view the
> incremental backups (I am using archfs).  What I would like to do, is
> somehow preserve the ownership of the files/increments so that users
> can simply mount my /mnt/rdiff-backup-directory (read-only mount) and
> browse their backed up files ... giving them the same access they
> would have had with the originals ...
>
> Is there an easy way to go about doing this ?  Or, will I have to
> create a new backup for each user's cron ?
>   
I dont think so. The simplest way it comes to my mind now is to do an
rfid-backup for each user but in your root cron, using sudo. So, if you
have, let's say:

pepe:users /home/pepe
juan:users /home/juan
maria:users /home/maria

You could do:

sudo -u pepe rdiff-backup /backups/pepe /home/pepe
sudo -u juan rdiff-backup /backups/juan /home/juan
sudo -u maria rdiff-backup /backups/maria /home/maria

You can even do it better with an script and the help of "stat" command,
something in this way:

for DNAME in $(find /home -maxdepth 1 -mindepth 1 -type d);
do
    USER=$(stat -c %U $DNAME);
    sudo -u $USER rdiff-backup $DNAME /backups/$USER;
done

It's just an idea, may be helpful (or not!) ;-)

> I tried using --preserve-numerical-ids ... but, the rdiff-backup-data
> is still owned by root ...
>
> Any ideas?
>
> Thanks,
> Damon
>
>
> _______________________________________________
> rdiff-backup-users mailing list at address@hidden
> http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
>
>   





reply via email to

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