Subject: Re: migrate system
To: Marton Fabo <morton@eik.bme.hu>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-users
Date: 02/10/2003 08:14:18
On Mon, 10 Feb 2003, Marton Fabo wrote:

> >   mount /dev/wd1a /mnt
> >   (cd /; tar -lpcf - .) | (cd /mnt; tar -xpf -)
> >
> >   mount /dev/wd1e /mnt/usr
> >   (cd /usr; tar -lpcf - .) | (cd /mnt/usr; tar -xpf -)
> >
> >   mount /dev/wd1f /mnt/var
> >   (cd /var; tar -lpcf - .) | (cd /mnt/var; tar -xpf -)
>
> This is also what I did, with some refinement. I used also -P
> --same-owner for tar, to keep the copy as similar to the original as
> possible.
>
> It always complained though about inability to link to non-existent
> files. It seems that the base NetBSD uses hard links, which have to be
> linked in the right order, or something similar. What may the exact
> reason be?
>
> mortee
>
> PS.: I'm trying now the cpio method, and see if it works better.

Try dump/restore:

	newfs /dev/rwd1a
	fsck /dev/rwd1a
	mount /dev/wd1a /mnt;
	cd /mnt
	dump -0f - /dev/rwd0a | restore -xf -

dump and restore should do the right thing with anything you might
happen to have in that file system, including sparse files.

The only drawback is, it's not completely automatated. "restore" is
going to ask you a stupid question when it's nearly done, and expect
a response from the terminal.

Frederick