Re: Backups; the dumbest question in the world
From: Ben O'Brien (ftoomch_at_hotmail.com)
Date: 09/28/04
- Next message: Adam Taube: "Re: pf multiple networks, two gateways, route-to question"
- Previous message: Ben: "Re: pf multiple networks, two gateways, route-to question"
- In reply to: Adam Taube: "Re: Backups; the dumbest question in the world"
- Next in thread: phn_at_icke-reklam.ipsec.nu: "Re: Backups; the dumbest question in the world"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 17:40:18 +1000
Adam Taube wrote:
>>nsswitch, I've been forced into having to remember to 'manually' copy my
>>backups weekly to one of the Sun boxes that get tape-backedup.
>>
>>Does anyone have any kind of solution to this?
>
>
> Use ssh tunneled rsync to back up from one machine to the other. You can
> generate keys using openssl so that your backup script can either copy the
> tar.gz directly to the other machine automatically without having to enter
> password - on the backup machine create a user called 'rsync' or whatever
> you decide, create the key on the source machine and put it in the
> authorized_keys file in ~rsync/.ssh/ - then have cron call a script that
> will do this:
>
> /usr/local/bin/rsync -e "ssh" -acqz /backupdir/backupfile.tar.gz
> rsync@host:/home/rsync/backupdir
>
> Great thing is you can have it synchronize sets as often as you like. Even
> have multiple versions in folders for each day of the week, however you want
> to do it :-)
>
> This assumes that rsync, openssl, are installed and sshd is running on your
> machines. You don't need to run the rsync server at all for this, sshd will
> call it.
>
> For more info, man rsync
>
> :-)
>
> Adam
>
>
Indeed, this is good.
I use a variant of this to back up my stuff. Rsync is fantastic for incremental backups, far better than the old tar and
dump utilities when using hard links. Take a look at http://www.mikerubel.org/computers/rsync_snapshots/ for a pretty
good guide to rsync incremental backups.
I think if one wants to use a cron job to do this backup using ssh as the rsync transport, then ssh-agent is a must.
This means you do not have to enter ssh private key passwords every time you want to do the backup (necessary for any
cron job). It keeps your unencrypted private key in memory until you switch the computer off. A great utility for
getting ssh-agent working properly is the keychain sh script by Daniel Robbins of Gentoo Linux fame. Even though it's
written for Linux, it's just a sh script and really should work on any system with sh I think. Here's the link
http://www.gentoo.org/proj/en/keychain/index.xml
If only there was an equivalent of ssh-agent and keychain for my gpg keys!
Ben.
- Next message: Adam Taube: "Re: pf multiple networks, two gateways, route-to question"
- Previous message: Ben: "Re: pf multiple networks, two gateways, route-to question"
- In reply to: Adam Taube: "Re: Backups; the dumbest question in the world"
- Next in thread: phn_at_icke-reklam.ipsec.nu: "Re: Backups; the dumbest question in the world"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|