From owner-freebsd-questions Sun Jul 11 19:35:47 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 860F714FE7 for ; Sun, 11 Jul 1999 19:35:26 -0700 (PDT) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.8.8) id WAA22278; Sun, 11 Jul 1999 22:36:13 -0400 (EDT) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199907120236.WAA22278@cc942873-a.ewndsr1.nj.home.com> Subject: Re: offsite backup programs/scripts? In-Reply-To: <3.0.5.32.19990710110057.04193ec0@crash.cts.com> from Jerry Preeper at "Jul 10, 99 11:00:57 am" To: preeper@cts.com (Jerry Preeper) Date: Sun, 11 Jul 1999 22:36:12 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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