From owner-freebsd-questions@FreeBSD.ORG Fri Oct 6 15:02:30 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B14F16A412 for ; Fri, 6 Oct 2006 15:02:30 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out3.blueyonder.co.uk (smtp-out3.blueyonder.co.uk [195.188.213.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD28043D7E for ; Fri, 6 Oct 2006 15:02:20 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [172.23.170.144] (helo=anti-virus03-07) by smtp-out3.blueyonder.co.uk with smtp (Exim 4.52) id 1GVrDO-0000sY-Iz; Fri, 06 Oct 2006 16:02:18 +0100 Received: from [82.41.253.33] (helo=[192.168.0.2]) by asmtp-out1.blueyonder.co.uk with esmtp (Exim 4.52) id 1GVrDN-0006BT-Jf; Fri, 06 Oct 2006 16:02:17 +0100 Message-ID: <45266FF7.4070306@dial.pipex.com> Date: Fri, 06 Oct 2006 16:02:15 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.13) Gecko/20060515 X-Accept-Language: en MIME-Version: 1.0 To: Grant Peel References: <038b01c6e94c$37144760$6401a8c0@grant> In-Reply-To: <038b01c6e94c$37144760$6401a8c0@grant> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Disaster recovery. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2006 15:02:30 -0000 Grant Peel wrote: > Hi all, > > I currently keep file dumps of all filesystems on our servers on a > secure raid 5 box, lees of course, the proc and swap dir. > > These dumps look like this and are done and transfered to a NFS > filesystem in the /mnt/ dir. > > server1-usr-full-dump > server1-home-full-dump > server1-var-full-dump > server1-root-full-dump > > So I have (all, I hope!) everything I need to rebuild a server should > the hard disk completely crap out, or some script overwrites or rm's > everything. > > I have never been in the position that this, ( a complete hard drive > ), had to be done. > > so the question is ... if I have the dumps on one machine, and I just > installed a new hard drive on another, in a nutshell, what are the > steps to > restore the failed server. Can I use the FreeBSD 'live' filesystem? Is > ther a step by step (that I have not found) in the handbook somewhere? Don't know that it's described anywhere, but in short below. You can try it on a live server, don't actually do any newfs or restores! Boot FreeBSD CD1 (pretty much any recent version ought to do unless there were changes to dump or fliesystem format). E.g. a 5.4 CD ought to restore a 6.2 machine just fine. Newfs/bsdlabel/fdisk stuff probably from post install configuration, so that you don't install any packages etc. This is where you need a paper record of your disk slicing/partitioning. Fixit shell and mount remote-partition-of-dumps using NFS on /mnt. This may need some kldloads. I've gotten stuff accessible via SAMBA like this so NFS ought to work. Needed to phutz with the load path for kldload. Mount fresh e.g. / partitions on e.g. /mnt2 . I'm pretty sure you can make new mount points as boot CD mounts root on a memory disk. restore -f /mnt/server1-root-full-dump -root (check man page!) Unmount /mnt and repeat for usr, home, var etc. Note that you can gzip your backups and use a restore command like: gzcat /mnt/server1-root-full-dump -root.gz | restore -f - -r Dumps take longer but take up less space. I do the same thing and also have incrementals. Always relied on figuring out what to do as I went along if I ever needed to, hence the somewhat sparse nature of the above procedure :-) --Alex