I needed to migrate an UFS filesystem from one disk to another. I had several options including using two tar processes in a pipeline or using dump and restore in a pipeline. I opted for the latter to make sure everything got preserved during the transfer.

Here’s the sequence of commands where /dev/gpt/nroot0 is the GPT label of the new filesystem and / is the donor filesystem:

newfs /dev/gpt/nroot0
mount /dev/gpt/nroot0 /mnt
cd /mnt
rmdir .snap
dump -0LaP 'restore -rf -' /
cd /
umount /mnt

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>