|
|||||||||||
|
Re: cron'ing rsync over ssh
From: Mark Leisher <mleisher(at)crl.NMSU.Edu>
Date: Fri Mar 21 2003 - 12:07:02 EST >> * Jesse Burkhardt <jesse@skybuilders.com> [2003-03-19 04:03]:
I'm almost done setting up a special backup system that needed this very thing. Here's a sketch of what you need to do: Our situation - create incremental backups of several critical file systems using rsync (http://www.mikerubel.org/computers/rsync_snapshots).
# ssh-keygen -t dsa -C '' -N '' > ~/.ssh/rsync-key 2. Copy the rsync public key file from the backup host to the machines containing the desired file systems: # foreach i (machine1 machine2 machine3) > ssh $i cat copy-of-rsync-key.pub >> ~/.ssh/authorized_keys > end 3. On the backup host, create a shell script for ssh-agent that does the backup: #!/bin/sh # # This script is run by ssh-keygen to a) add the private key to ssh-agent # and b) run the backup using rsync. # ssh-add $HOME/.ssh/rsync-key for i in machine1 machine2 machine3; do rsync -az $i:/some/file/system /local/directory done 4. Run the backup process (where backup.sh is the shell script described above): # ssh-agent backup.sh Mark Leisher Computing Research Lab Let Saddam run a movie studio. New Mexico State University He can make bombs there. Box 30001, Dept. 3CRL -- Robin WilliamsLas Cruces, NM 88003 Received on Fri Mar 21 13:17:40 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:55 EDT |
||||||||||
|
|||||||||||