Date: Fri, 20 Jan 2023 12:38:24 +0300 From: Lev Serebryakov <lev@FreeBSD.org> To: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org> Subject: How to "zfs receive" full pool stream without overwriting existing filesystems? Message-ID: <1fabeb48-b226-8618-7cc8-552f9d0aa38b@FreeBSD.org>
index | next in thread | raw e-mail
I have full ZFS pool backup created with "zfs send -RL zpool@full-backup".
Now I need to extract several files from this backup ON SAME SYSTEM IT WAS CREATED. I'm trying to "unpack" it with:
1. # ... | zfs recv -v -n -d zroot/backuprestore
cannot receive: specified fs (zroot/backuprestore) does not exist
2. # zfs create zroot/backuprestore
3. # ... | zfs recv -v -n -d zroot/backuprestore
cannot receive new filesystem stream: destination 'zroot/backuprestore' exists
must specify -F to overwrite it
4. # ... | zfs recv -v -n -d -F zroot/backuprestore
would receive full stream of zroot@full-backup into zroot/backuprestore@full-backup
would receive full stream of zroot/usr@full-backup into zroot/backuprestore/usr@full-backup
cannot receive new filesystem stream: destination has snapshots (eg. zroot/usr/ports@backup-20230116)
must destroy them to overwrite it
So, (1) asked for existing target filesystem. (3) asked for "force" to overwrite existing filesystem required by (1).
But anyway, it trys to overwrite existing filesystems (zroot/usr/ports) instead of creating new one (zroot/backuprestore/usr/ports), what happens?! Why does it properly "unpack" `/usr` but not `/usr/ports`?!
What should I do to receive this backup at "new root" on this host?
--
// Lev Serebryakov
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1fabeb48-b226-8618-7cc8-552f9d0aa38b>
