Date: Mon, 7 Oct 2019 08:28:29 -0400 From: mike tancsa <mike@sentex.net> To: Alejandro Imass <aimass@yabarana.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Guides for ZFS Full backup to NFS drive and restore from NFS drive Message-ID: <e4b66e5a-d722-09bd-863e-542da2e38b13@sentex.net> In-Reply-To: <CAHieY7SKdoNcmYG8SR8WWwjT%2BxG_O0A1Gufkhj7GXZpww_fOiw@mail.gmail.com> References: <CAHieY7S5W1NnQp9e=Dk3y_d1bdDgVwyw-3LTK%2BfeoKSDaGDegg@mail.gmail.com> <9177b014-9041-f51e-1856-b6dbdec4afc1@panix.com> <20191005104413.39e3c081.freebsd@edvax.de> <CAHieY7SKdoNcmYG8SR8WWwjT%2BxG_O0A1Gufkhj7GXZpww_fOiw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/5/2019 8:35 AM, Alejandro Imass wrote: > Nope you definitely understood the question precisely. > What I want to do now is backup the entire system, reconstruct the raid1 > pool and then restore the whole system INTACT. > Something like this ? You have the entire system snapshotted into a file snapshot -r zroot@level0 zfs send -Rv zroot@level0 | gzip > /nfsmount-on-nfs-server/level0-backup.gz On the box where you will do the restore to two fresh drives. I usually do just a netboot. Best not to do it on a system that has the same zfs name (eg two zroots) as it confuses things. gpart destroy -F ada0 gpart destroy -F ada1 gpart create -s gpt ada0 gpart create -s gpt ada1 gpart add -s 222 -t freebsd-boot ada0 gpart add -s 222 -t freebsd-boot ada1 gpart add -s 8g -t freebsd-swap ada0 gpart add -s 8g -t freebsd-swap ada1 gpart add -t freebsd-zfs ada0 gpart add -t freebsd-zfs ada1 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 #make sure /mnt2 exists zpool create -f -o altroot=/mnt2 -O canmount=off -m none zroot mirror /dev/ada0p3 /dev/ada1p3 gzcat /nfsmount-on-nfs-server/level0-backup.gz | zfs recv -vF zroot gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 #import it, but its probably already there so dont worry about the error zpool import -f -o altroot=/mnt2 zroot zpool set bootfs=zroot/ROOT/default zroot ---Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e4b66e5a-d722-09bd-863e-542da2e38b13>