From owner-freebsd-questions Thu Feb 14 10:15:22 2002 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (dsl-64-192-6-133.telocity.com [64.192.6.133]) by hub.freebsd.org (Postfix) with SMTP id 361B137B405 for ; Thu, 14 Feb 2002 10:15:16 -0800 (PST) Received: (qmail 5294 invoked by uid 100); 14 Feb 2002 18:15:07 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15467.65195.233651.262438@guru.mired.org> Date: Thu, 14 Feb 2002 12:15:07 -0600 To: Mark Edwards Cc: questions@freebsd.org Subject: Re: Backup routine In-Reply-To: <54801113@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: "Mike Meyer" X-Delivery-Agent: TMDA/0.44 (Python 2.2; freebsd-4.5-STABLE-i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mark Edwards types: > I've got an installation of FreeBSD 4.4 Stable running along quite nicely. > Now I'm trying to design a backup system for it. The number of answers to this problem is roughly the same as the number of sysadmins. > This installation is mainly a personal server. It's running on a Seagate > IV ATA HD, and it is a low-access server. It runs my personal mail, and my > personal web site. > I have a second identical HD that I'm intending to set up a nightly dump to. > My questions: > - Is that a decent backup scenario? In general, yes. However, it doesn't provide a backup in the case where the entire machine is fried. My solution to that was to throw in a CDRW, and burn a copy of that on a regular basis. More details below. > - Is there a good reason I should use a tape drive instead? Tape drives have a lower cost per byte, and make it possible to keep long-term backups. But so does a CDRW. Almost every backup system I've worked with dumps to local disk, then creates archives of that on a removable media of some kind. That allows you to do restores of accidently deleted files and the like from the on-disk copy, while providing archival copies of the data as well. > - Should I use something other than dump? No. Everything else loses some of the file system information. Some of them can't even back up devices properly. > Does it make sense to create a bootable copy instead of a dump file > (i.e. a dump | restore)? Only if your configuration can't boot the rescue CD (#2 in the release set). > - Does it make sense to mount/unmount the backup HD as part of the backup > routine, so that it will not be evident to a hacker? Note that you're just lowering the probability of a hacker finding it, which is a good thing. However, it makes your backups a bit more complicated. Personally, I don't - but I don't keep backups of the web/mail server on that machine. One thing you've overlooked is that dump doesn't happen instantaniously. If files are changing when you run the dump, they won't show up on the dump, or will be damaged if they do show up. I therefore recommend doing level 0s with the system single user, and running daily dumps via the periodic system to make sure that the dumps don't wind up running at the same time as something else run from the periodic system. That assumes that you're doing anything critical via - like snapshotting a database - via the periodic system as well. My solution on hardware similar to yours is to take the system down to single user mode and do a level 0 dump into CD sized chunks to the second disk. If you've got a writable DVD, use that size instead. I then bring the system back up, and burn those chunks to CD in an ISO fs, check that the bits that are on the CDRW are the same as the ones on the disk, and if that's true delete the copy on the disk and move the CDs to offsite storage. The automated script runs level 8s most days of the week to the second disk, and level 4s monday morning, using a file name of the form /backups///.dump.gz. After the level 4s, it burns and verifies a CD of the level 4 dump directory. I make sure that worked, and then unmount and label that CD before moving it to offsite storage. When the level 4s get so large that only one fits on a CDRW, I make a new set of level 0s. That way, if I lose the HD, I've got a backup of everything to that morning. If I lose the entire machine, I've got a backup of everything to the previous monday, which is an acceptable risk for my machine. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message