TrueNAS Migrate
Last Updated: November 6, 2021
Migrating from GELI encryption to native ZFS encryption
This is the process I used to migrate the legacy encryption used in FreeNAS. It requires a completely new pool.
- Create a new Pool in TrueNAS,
FileStoreNew
, use the Key encryption type with the default cipher.
My old pool is called FileStore
. I will rename this once the transfer is done & verified.
- Create a snapshot of the dataset you wish to transfer.
zfs snapshot -r FileStore/Media@migrate
- Use the zfs send/recv command to copy the data over, plus the detaset metadata and permissions. This will also move over all the snapshots.
zfs send -v -R FileStore/Media@migrate | zfs recv -v -F -d -x encryption FileStoreNew
Repeat steps 2 and 4 for all your datasets.
The command above will enable the Inherit encryption properties from parent. If you wanted a separate key, you can go into encryption options and change this.
Verify all the files.
To rename the pool we will export and reimport the pool as a different name.
zpool export FileStore
zpool import FileStore FileStoreOld
zpool export FileStoreNew
zpool import FileStoreNew FileStore