From owner-freebsd-questions@FreeBSD.ORG Thu Jun 7 14:24:02 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF27316A400 for ; Thu, 7 Jun 2007 14:24:02 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id AAE3113C468 for ; Thu, 7 Jun 2007 14:24:02 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.1/8.14.1) with ESMTP id l57EO1Nm075137; Thu, 7 Jun 2007 08:24:01 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.1/8.14.1/Submit) with ESMTP id l57EO17k075134; Thu, 7 Jun 2007 08:24:01 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 7 Jun 2007 08:24:01 -0600 (MDT) From: Warren Block To: Ian Lord In-Reply-To: <03f801c7a8d6$c712bc30$6400a8c0@msdi.local> Message-ID: <20070607080017.U74727@wonkity.com> References: <03f801c7a8d6$c712bc30$6400a8c0@msdi.local> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wonkity.com [127.0.0.1]); Thu, 07 Jun 2007 08:24:01 -0600 (MDT) Cc: freebsd-questions@freebsd.org Subject: Re: Moving Freebsd to a new Server 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: Thu, 07 Jun 2007 14:24:03 -0000 On Thu, 7 Jun 2007, Ian Lord wrote: > Basically, I need a way to dump the hd to file, transfer the file over > whatever media (dvd, network, etc) and restore on the new machine. Personally, I do a minimal install of FreeBSD on the target machine first. That lets you set the partitions the way you want and gives you a complete set of tools. As always, back up the source machine before starting. Dump the /, /var, and /usr filesystems from the source machine into files, and any others with contents you need. For example: dump -0af /tmp/slash.dump / Of course, the output should be on a different filesystem than the one being dumped, and ideally a separate disk to avoid head thrashing (/tmp shown below, but most people don't have enough space in /tmp to do it. You can use NFS or ssh or other methods to use remote files.) On later versions of FreeBSD, you should give dump the -L option to use a snapshot of the filesystem. Giving dump more memory with -C can also help, although it runs multiple instances, so too much will cause swapping. Ultimately, for a typical FreeBSD 6.2 machine: dump -C8 -L -0af /tmp/slash.dump / dump -C8 -L -0af /tmp/var.dump /var dump -C8 -L -0af /tmp/usr.dump /usr Get those files onto the target machine, again in an unused filesystem or separate disk, and restore: cd /usr restore -ruf /tmp/usr.dump cd /var restore -ruf /tmp/var.dump cd / restore -ruf /tmp/slash.dump Now is a good time to fix anything that will be different in /etc/fstab, like references to ad0 that should be ad2. Reboot and fix anything else that needs to be changed. -Warren Block * Rapid City, South Dakota USA