timetraveler Posted September 18, 2023 Share Posted September 18, 2023 TL;DR: Need guidance on transferring ZFS datasets and snapshots from an unencrypted drive to an encrypted one. Context: I've successfully converted a cache SSD and HDD into ZFS following this guide and then setting up nightly snapshots of the cache SSD, replicated to the HDD according to this guide from @SpaceInvaderOne now I aim to encrypt my unraid server. As a test, I've already encrypted one empty drive. works great! Issue: I'm looking to move data from the unencrypted drives to encrypted ones, and then reformat the unencrypted ones and then move the data back (at least for the SSD) Although I plan to follow this encryption guide , my concern is about the ZFS datasets and snapshots present on the existing drives. I'm unsure how the mover tool in the guide would work with these ZFS features as the tutorial didn't feature any of those Request: Should I consider using native ZFS features, like 'zfs send', for this transfer? If so, how? should I perhaps use spaceinvaders replication script to move/copy the data? or syncoid directly? I'd appreciate any advice or tips on this process. note: please ignore the Disk2 in the example screenshot is encrypted-xfs. I am planning to reformat it to encrypted-ZFS Quote Link to comment
JorgeB Posted September 19, 2023 Share Posted September 19, 2023 You can use zfs send with the replicate option (-R), it will replicate the complete filesystem up to the last snapshot. 1 Quote Link to comment
Solution timetraveler Posted September 21, 2023 Author Solution Share Posted September 21, 2023 Thank you that worked. This is what i used to move the data: take a snapshot of all datasets zfs list -H -o name -r poolname | while read dataset; do zfs snapshot "${dataset}@snapshot_name"; done transfer zfs send -R -v cache@snapshot_transfer | zfs receive -F disk2 also make sure there are no regular folders on the root level! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.