[SWLUG] Network backups
Justin Mitchell
justin at discordia.org.uk
Sun Sep 10 19:00:24 UTC 2006
On Sun, 2006-09-10 at 19:03 +0100, Glenn Booth wrote:
> Hi,
>
> On 10/09/06, David Goodwin <dof at codepoets.co.uk> wrote:
>
> You may find tar to be simpler/easier in this instance e.g.
>
> sudo tar -zcf - /home | ssh user at remote_host "cat >
> backup.tar.gz"
>
> I thought of using tar, but wasn't sure if it would keep symlinks,
> file
> ownerships, hidden files etc. intact.
>
>
> Rsync is really only of any use if there are existing files
> for it to do
> comparison(s) with; for a one off job, tar will most likely be
> more
> efficient.
>
> I thought rsync wasn't the right tool for the job, but I didn't know
> of a better
> one! Time to do some more reading, methinks.
first time you do the backup, doesnt make much difference.
the next time you want to update the backup it makes a huge difference.
yes, the backup needs to be done with roots permission to access all
of /home, putting the job in roots crontab would probably be the easiest
thing.
you can mess about with sudo, but as you will undoubtedly want to run
the backup in some automated way, so typing passwords into sudo isnt a
terribly useful idea, so you would have to fiddle about with being able
to sudo certain commands without a password.
also, when connecting to the remote machine it will also normally ask
you for a password, this can be fixed by using authorized_keys. in
short, use ssh-keygen to make a public/private key pair, copy the public
key to be ~/.ssh/authorized_keys on the machine your connecting into. it
wont ask you for a password anymore.
More information about the Swlug
mailing list