Subject: Re: Moving NetBSD (2.0.2 x386) to bigger disk
To: Gilles Gravier <Gilles@Gravier.org>
From: Johnny Billquist <bqt@Update.UU.SE>
List: netbsd-users
Date: 08/20/2005 12:42:30
On Sat, 20 Aug 2005, Gilles Gravier wrote:

> Hi all!
>
> I'm about to get a bigger disk for my machine (all other hardware remains).
> What's the best way to transfer the existing system to the newer machine?
>
> dd if=olddisk of=new disk won't work since different sizes.
>
> cp -r will probably mess up links and special devices.
>
> If I can avoid re-install and cp -r /etc /home /var /usr/pkg /usr/pkgsrc then
> I'll be happy. :)

From the manpage for restore:

---snip---

     -f file
             Read the backup from file; file may be a special device file like
             /dev/rst0 (a tape drive), /dev/rsd1c (a disk drive), an ordinary
             file, or `-' (the standard input).  If the name of the file is of
             the form ``host:file'', or ``user@host:file'', restore reads from
             the named file on the remote host using rmt(8).  If the name of
             the file is `-', restore reads from standard input.  Thus,
             dump(8) and restore can be used in a pipeline to dump and restore
             a file system with the command

                   dump 0f - /usr | (cd /mnt; restore xf -)

---snip---

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol