Hi all,
Last week I decided to finally migrate my RAIDZ2 nas (+ local backup destination) to a mirror set up with an encrypted root dataset (to facilitate raw sends to an untrusted offsite replication destination – WIP).
I was very pleased with how everything went but have already run into my first minor snag. As luck would have it, an unrelated machine on ZFS root decided to die this week. Thankfully I was sending this machine’s backups to the nas, so I don’t think I have any significant data loss.
(Rereading before I submit – probably helpful context to note that this is my first real system recovery with ZFS.)
The trouble I’m having is figuring out how to send from the encrypted backups and do a (ideally full) replication on the new device for the dead machine.
On my machine with the backups:
tank
is the pooltank/enc
is an encrypted dataset- my basic hierarchy is
tank/enc/zfs-backups/machinename/poolname
I’ve made a recursive snapshot at tank/enc/zfs-backups/mymachine/rpool@recovery
Let’s call the new pool newpool
.
My problem is that doing a recursive send fails, complaining that an encrypted dataset may not be sent with properties without the raw flag
.
I was hoping I could zfs send -R ... | zfs recv -x encryption ...
, but that doesn’t work.
It recommends that I raw send (-w
), but I’m pretty sure that will result in me having encrypted datasets on newpool
, which I don’t want in this case – nothing on this device warrants encryption.
What I’m hoping for is to send tank/enc/zfs-backups/machinename/rpool
and up with a copy of rpool
(including all descendants, snapshots, and ideally properties like compression
), i.e. tank/enc/zfs-backups/machinename/rpool/foo/bar
→ newpool/foo/bar
.
Based on a few openzfs issues, I’m thinking that this is not readily possible due to a conflict between -R
and the encryption
property, and that instead I’ll need to manually send datasets over and then manually address properties. Does that sound right?
How would you approach this?
What can I do to make this restoration process easier next time? Somehow I was under the impression that I was going to be able to zfs send | zfs recv
and be on my way.