From owner-freebsd-doc@FreeBSD.ORG Tue Feb 27 00:26:45 2007 Return-Path: X-Original-To: freebsd-doc@freebsd.org Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE40316A46E for ; Tue, 27 Feb 2007 00:26:44 +0000 (UTC) (envelope-from djdexter@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id 77D2313C481 for ; Tue, 27 Feb 2007 00:26:44 +0000 (UTC) (envelope-from djdexter@gmail.com) Received: by nf-out-0910.google.com with SMTP id k27so1696578nfc for ; Mon, 26 Feb 2007 16:26:44 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=APN0mcFdIEH1c+4ThI/BtwRxAX1vRJJfLj6HDIw5X0C6itXt7eCwBBrGCU2y+z188XfjhXsgN80h+1mDu0L9d46maS1QYrrAc4QSQuu4iWqVyfzLDjxkJY4U6brWLF66GEnG4IFfLHMAiNWJSiP1S0btpcEkklwzQiA6BMP63ow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DkZX3WoBVkF3N9t3bILTNIQt4G4K9PWeMzUc2RybQg1QN0xjlH08HEVNmC1nlK8LBfzUOC024EOuLv7VeAaNnqMvj3f6QXnfRve/O1tjVT36WGY6znYO0CWBV3uZ/KxmVhBet44pzk/Gk40RCv7Znlxa0M778cmwpw3ydU0b4YY= Received: by 10.82.175.2 with SMTP id x2mr2062157bue.1172534444021; Mon, 26 Feb 2007 16:00:44 -0800 (PST) Received: by 10.82.114.14 with HTTP; Mon, 26 Feb 2007 16:00:43 -0800 (PST) Message-ID: Date: Mon, 26 Feb 2007 19:00:43 -0500 From: dex To: freebsd-doc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: RE: HOWTO Restore a FreeBSD system using the fixit CD X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2007 00:26:45 -0000 This is a response to an old email. I wasn't able to find the actual HOWTO other than in the mailing list archives, so I figured I'd just post. I have an addendum to the Step Four restore command. A more flexible way to restore would be via network. To backup I usually do something like this (from a Windows host, which runs the software for our tape library): > "C:\Program Files\PuTTY\plink" -batch -i "%userprofile%/backup.ppk" backup@host.domain.local /usr/bin/nice /sbin/dump -0Lauf - / | gzip -c > host-root-full.dump.gz So now the dump file is on the backup hosts' HD which is also accessible via password protected HTTP. On the new system, boot from FreeBSD CD 1, setup networking (under Configure, Networking, Interfaces), partition and format your HD like you want - following the instructions in the HOWTO, then when you get to the restore command it would be something like this: # /mnt2/usr/bin/ftp -o - http://username:password@backup.domain.local/host-root-full.dump.gz | /bin/zcat | /mnt2/sbin/restore -ruvyf - Most of the documentation I've seen involves using dump/restore with a tape drive or from some sort of mount. For me and possibly others, this method is much more flexible. If you need better security, it's also possible to initiate the restore from the backup server so it doesn't have to listen to any outside requests and therefore can't be cracked as easy. Use SSH instead of HTTP, assuming your network transport is insecure. That would look something like this: =============== -The system you are restoring to should have a base install (minimal) of FreeBSD near the same version of the one you are restoring. The closer the better, since that will reduce the chance of the root fs not restoring properly since some required stuff for ssh is under both that and /usr. -Make sure you restore all other mount points before /. With recent versions (>6.1), it's best to also transfer the root dump file over to /var/tmp so you have it available for restore if sshd breaks because of the /usr restore (get errors about 'Binary file not executable'). -Make a backup of /etc/fstab if the destination FS's and device names aren't the same as the original server, then restore it before you reboot the server. For example, after restoring /var put a copy of /etc/fstab in /var/tmp, restore /, then 'cp /var/tmp/fstab /etc'. -kill non-vital services except sshd, so you don't have daemons going crazy while fs structures change out from under them. -Don't worry if you see a "cannot open /dev/tty: Device not configured" error, it's just cd complaining. -You will probably have to do a 'cd /; chflags -R noschg *' on the destination server before restoring /usr and /. -If using cygwin the command would look something like this: bash -c "zcat host-usrhome-full.dump.gz | ssh root@host.domain.local 'cd /usr/home; /sbin/restore -ruvyf -'" -If using putty/plink it would look something like this: zcat host-usrhome-full.dump.gz | "C:\Program Files\PuTTY\plink" -i "%userprofile%/backup.ppk" root@host.domain.local cd /usr/home; /sbin/restore -ruvyf - ===============