Newbie problems

Matt McCutchen
Sat, 02 Jun 2007 04:25:44 -0000

On 5/28/07, Boniforti Flavio <boniforti.f@gmail.com>
wrote:
> I want to back-up my PC's /home directory onto another Linux PC. On
> the "server" I've set up a directory called /backup and now
I'd like
> to know which permissions it should have for that my backups succeed.
>
> What I want to achieve is that I have my /home eactly copied over,
> maintaining ownership and permissions on files and directories. Is
> this possible?

Yes; just pass the -a option to the client.  You may also wish to use
--numeric-ids .

> How should I be setting "uid" and "gid" in the
server's conf file?

You should set both to root so that the server (more properly called a
daemon) has the power to set the ownership of the backup files.
Otherwise, the daemon will silently skip setting the ownership.

> How should the permissions on /backup be set?

The daemon will work no matter what the permissions and ownership of
/backup are because it has root power.  However, you may wish to copy
/home onto /backup/home rather than /backup (if you weren't planning
to do so already) and then set /backup to 700 permissions and
root:root ownership.  That would prevent other users on the server
computer from accessing the backup directly.

Matt