--owner --group without root access?

Philip Mak pmak at animeglobe.com
Sun Dec 30 23:40:23 EST 2001


On Sun, 30 Dec 2001, Kevin Easton wrote:

> > Is there a way to preserve the owner and group permissions without having
> > root access?
>
> You can do this by creating a tar archive of your filesystem (NOT
> compressed though), and rsync that across to the backup machine.
> Then you'll just have to be root when you extract the tar archive to
> recreate the ownership/ permissions.  As long as you don't use
> compression, you'll still get the rsync speedup.

My previous backup solution actually uses tar, but there's two problems
that I have with it:

1. My backup file, even when compressed with .bz2, exceeds 2 GB by a
little. The backup machine has an older kernel that doesn't support >2 GB
files and upgrading it is not an option because this is a dedicated
server.

2. tar archives are a pain to work with if I just want to go in and find
one specific file that I need to recover; it takes a long time to extract
a file.

Giving the situation some more thought, it might not be hard to be able to
use rsync to preserve file ownership without having root access.  It would
be just a matter of getting a "ls -lR" of the data, and having some
program that can parse that to recover the original file ownership if
necessary.

Has anyone already done something like this by any chance?





More information about the rsync mailing list