Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 1999 22:36:12 -0400 (EDT)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        preeper@cts.com (Jerry Preeper)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: offsite backup programs/scripts?
Message-ID:  <199907120236.WAA22278@cc942873-a.ewndsr1.nj.home.com>
In-Reply-To: <3.0.5.32.19990710110057.04193ec0@crash.cts.com> from Jerry Preeper at "Jul 10, 99 11:00:57 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Jerry Preeper wrote,
> I was wondering if anyone has run across or uses a backup program/script
> that will basically mirror a complete server hard drive (including OS and
> everything) and updating only what's changed on a completely separate
> computer with an identical hard drive.  I'd like to do the backup over the
> net with my cable modem. 

This should be pretty easy to do using dump. The basic idea would be a
script that does something like,

#!/bin/sh
#
# netdump level
#
# Uses dump on the local machine and then restore on the
# remote in order to clone the local HDDs on the remote machine.
# The level argument is the dump level.

# Remote machine name or address
REMOTE=remote.machine.org

if [ -n $1 ] || [ $1 -gt 9 ] || [ $1 -lt 0 ]; then
   echo $0: illegal dump level: $1
   exit 1
fi

# File systems I want to backup
FILESYTEMS="/ /usr /var"

for FS in $FILESYSTEMS; do
    dump -${1}auf - $FS | ssh $REMOTE "cd $FS; restore -rf -"
done

exit 0

However, I would not completely recommend that. Even if your other
system is a clone of the other, you may not want to do things like
clobber log files, files in /var/run, some configuration files in /etc
(rc.conf has things like IP address and hostname), and more. You could
still use the above script and carefully use the nodump flag on files
and directories.

I am presently still working out how to do something similar. I have a
mailserver, and recently have been setting up a backup. The backup
is a _near_ clone of the server, but not quite for the reasons in the
previous paragraph. But if the backup is called into duty, _then_ it
should be an exact copy of the other server. It's relatively easy to
copy files from one machine to another (I pipe tar output through ssh
rather than dump since I only do certain files that change
frequently), but then  figuring out a script to convert the backup
into the main server... fun, fun. :)
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907120236.WAA22278>