From owner-freebsd-questions@FreeBSD.ORG Mon Apr 19 20:12:02 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7842106564A for ; Mon, 19 Apr 2010 20:12:01 +0000 (UTC) (envelope-from utisoft@googlemail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 6FFE88FC16 for ; Mon, 19 Apr 2010 20:12:00 +0000 (UTC) Received: by bwz8 with SMTP id 8so4834753bwz.3 for ; Mon, 19 Apr 2010 13:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=CUix4I4N4dfX7cYRyHhjIecPTIArma0/919nULwjXhk=; b=ssujCD3YwzASCc+L86PKUJTGUHz7lSWzXx8X/SMCn+uQfR/7nBejknQbWEDNODt88e eYQolT6ATHvfE/aGcK9K0s4YG/DA5acYQNrbvMM1uWoP7PYPAerwJZlUa45KvgKFV8bW nDQrqHk3609rauiBObDx6r1gliORbWN5bPyLU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=XkHL5jvcFqUTwmbNtqN4450TRYcZdsvpxXgUMRL5U+2BSbd1KUqx1bLksE5ot2y1ar PDs0d/DAlkaIHx0bT7R/F2CRNKteYWHoD0pfHlrKAiJKXY/Smu4t3AyNf36drMhv8u6j W0P3b7kfs1Bnwr/WhuMRT0r2Ec/y1fExI/4Jo= MIME-Version: 1.0 Received: by 10.204.66.6 with HTTP; Mon, 19 Apr 2010 13:11:27 -0700 (PDT) In-Reply-To: <4BCB1DB1.2030802@sbcglobal.net> References: <4BCB07C0.8010305@sbcglobal.net> <20100418161015.f20206f0.freebsd@edvax.de> <1271601423.1287.15.camel@localhost> <4BCB1DB1.2030802@sbcglobal.net> From: Chris Rees Date: Mon, 19 Apr 2010 21:11:27 +0100 Received: by 10.204.6.25 with SMTP id 25mr5088472bkx.135.1271707917432; Mon, 19 Apr 2010 13:11:57 -0700 (PDT) Message-ID: To: "J.D. Bronson" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions Subject: Re: Backing up freebsd to 1 file? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2010 20:12:02 -0000 On 18 April 2010 15:56, J.D. Bronson wrote: > =A0be created by the time your system boots on. >> >> Nice answer by Sergio, but I personally would use the j option with tar >> to compress to bzip2; >> >> 3) tar --one-file-system -cvjf /mnt/backup.tbz ./ var usr home >> >> Though I prefer personally to use dump/restore because: >> >> - If you're on UFS, you don't have to single-user the system, just use >> the L option (live filesystem) >> - Restore has an awesome 'interactive' mode >> - See Zwicky [1] >> >> I'll send you my dump scripts if you're interested. It's dead easy to us= e! >> >> Chris >> >> [1] http://www.coredumps.de/doc/dump/zwicky/testdump.doc.html >> >> . >> > > I think Sergio has a nice script. I had been doing something similar but = I > know I recall when untarring =A0(restoring if you will) it was complainin= g > about not being able to do things. It was not sockets and similar stuff t= hat > gets rebuilt on reboot. I do not have failures handy to post (yet). > > Truth be told? - I am running FreeBSD hosts within ESXi. I can backup the > hosts within ESXi but need to take the host offline and its a cumbersome > ordeal. If I had RAID on ESXi, I wouldn't be so worried per se but this i= s > not an option. ESXi is very fussy about what is supported and I dont have > the $ for SCSI and SCSI Raid. > > Basically what I need to do is create a fully restorable backup for 2 > reasons: > > 1. Easy to create another host on ESXi. I can setup/flavor my fbsd instal= l > and then once thats done, setup another host. > > 2. Obvious backup reasons. > > ...right now, if the SATA drive fails that is hosting the fbsd install I = am > dead in the water. I have 5 hosts on this machine spread across 4 SATA > drives but nothing is mirrored or RAIDed in anyway. > > I am at the mercy of these drives w/o any backup- > > Yeah, use dump. It's excellent, and you can bz2 the results. My script for dumping: #!/bin/sh # $Id: backuphdd.sh,v 1.3 2010/02/02 13:02:06 root Exp $ # $Log: backuphdd.sh,v $ # Revision 1.3 2010/02/02 13:02:06 root # Changed so that backup/spare is only manipulated when backup level is 0 # # Revision 1.2 2009/12/22 16:13:05 root # Now uses bzip2 LEVEL=3D$1 mount /backup/dumps mv /backup/dumps/root_level_$LEVEL.bz2 /backup/dumps/root_level_$LEVEL.bz2.= old dump -$LEVEL -Lauf - / | bzip2 > /backup/dumps/root_level_$LEVEL.bz2 mv /backup/dumps/var_level_$LEVEL.bz2 /backup/dumps/var_level_$LEVEL.bz2.ol= d dump -$LEVEL -Lauf - /var | bzip2 > /backup/dumps/var_level_$LEVEL.bz2 mv /backup/dumps/usr_level_$LEVEL.bz2 /backup/dumps/usr_level_$LEVEL.bz2.ol= d dump -$LEVEL -Lauf - /usr | bzip2 > /backup/dumps/usr_level_$LEVEL.bz2 umount /backup/dumps ---end---- I call it from cron ~3 in the morning with a tower of hanoi rotation; it takes the argument to the script as the dump level; /root/backuphdd.sh 0 performs a level 0 dump of all the drives. Don't forget to back up _all_ your partitions! Dump only backs up separate partitions... Chris