[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-fs
Subject:    How to "zfs receive" full pool stream without overwriting existing filesystems?
From:       Lev Serebryakov <lev () FreeBSD ! org>
Date:       2023-01-20 9:38:24
Message-ID: 1fabeb48-b226-8618-7cc8-552f9d0aa38b () FreeBSD ! org
[Download RAW message or body]


   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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic