Date: Thu, 7 Jun 2007 08:24:01 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Ian Lord <mailing-lists@msdi.ca> Cc: freebsd-questions@freebsd.org Subject: Re: Moving Freebsd to a new Server Message-ID: <20070607080017.U74727@wonkity.com> In-Reply-To: <03f801c7a8d6$c712bc30$6400a8c0@msdi.local> References: <03f801c7a8d6$c712bc30$6400a8c0@msdi.local>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070607080017.U74727>