Re: duplicating servers - remote backup to HD
On Sat, Dec 06, 2003 at 01:33:32PM -0900, W.D.McKinney wrote:
>Hello,
>
>I'd like to backup a couple of Debian Woody servers remotely to my a
>Storage array that I was given recently. The servers are are at a local
>colo and I nad a xDSL connection provided by the ISP that serves the
>Colo so that's good. I am thinking that someone might have an rysnc
>script that are using like this ? Is there one available any where ?
>
Sure, here's what I use for taking an image of a system. If you plan
to restore from your backup don't exclude your hostname, ssh host
keys, etc. You do want to exclude /proc and any NFS etc though. And
don't forget '--numeric-ids' as the specific numbers are referenced in
/etc/{passwd,group}
rsync -av --progress --delete-excluded --numeric-ids \
--exclude=**/cdrom/* \
--exclude=**/etc/hostname \
--exclude=**/etc/mtab \
--exclude=**/etc/network/interfaces \
--exclude=**/floppy/* \
--exclude=**/var/lock/* \
--exclude=.bash_history \
--exclude=.viminfo \
--exclude=/.ssh/id* \
--exclude=/etc/**/\@* \
--exclude=/etc/**/current \
--exclude=/etc/ssh/ssh_host_dsa_key \
--exclude=/etc/ssh/ssh_host_dsa_key.pub \
--exclude=/etc/ssh/ssh_host_rsa_key \
--exclude=/etc/ssh/ssh_host_rsa_key.pub \
--exclude=/supervise/status \
--exclude=/tmp/* \
--exclude=/var/backups/*gz \
--exclude=/var/log/**/\@* \
--exclude=/var/log/**/current \
--exclude=/var/log/dmesg \
--exclude=/var/run/*pid \
--exclude=/var/tmp/* \
--exclude=dhclient.leases \
--exclude=dhcpd.leases \
--exclude=known_hosts \
--exclude=locatedb \
--exclude=ntp.drift \
--exclude=proc/* \
--exclude=random-seed \
--exclude=utmp \
--exclude=wtmp \
$src $dest
you'll need "-essh" and root on both sides to read/create all the uids.
Caveat emperor and you may still have some problems with daemontools
control files being included...
// George
--
GEORGE GEORGALIS, System Admin/Architect cell: 646-331-2027 <IXOYE><
Security Services, Web, Mail, mailto:george@galis.org
Multimedia, DB, DNS and Metrics. http://www.galis.org/george
Reply to: