Moving everything to a new machine

Hello everyone,

I’m in the process of retiring my old machine and I would love to move everything (data, containers and settings) to a new machine.

I need help to fine tune the process. The idea is to:
1- create a new pool on the new machine
2 - zfs replicate from old “tank” to new “tank” with all the datasets
3 - export pools from both my old machine and new machine
4 - save the config file and restore over the new machine
5 - tweak network settings in the new machine
6 - import the pool in the new machine
7 - ???
8 - profit

Am I missing something or is it overall the correct way to tackle this? In case you have any documentation to help me out I’d love to read it.

Thanks,

Mike

You could just move the disks from one machine to another unless you are re-doing them in a different type or different zraid level and import the config on the new machine.

I did that in the past but I’m going from 6x4TB wd red plus to 5x8TB EXOS. Can’t really swap disks, I only have 5 slots in the new machine.

I think you can import a pool to a larger one then expand the pool to use the additional space but I am really not completely sure as I have never needed to do that. Maybe someone who has more knowledge can give a better answer.

Managed to migrate everything but docker won’t start. No luck with apps. Any help is welcome!

I think you may have to tell the docker setup the new systems ethernet name to bridge or work with. A new machine the ethernet connection name is very likely different.

You might also have to unselect and reselect the pool to use with apps if not already done so.

Unfortunately even recreating the bridge network wasn’t enough. I have two pools on the new system. If I select the fresh one, docker starts no problem. With the replicated one it doesn’t and I get this:

Failed to sync TRUENAS catalog: [EFAULT] Failed to clone ‘GitHub - truenas/apps’ repository at ‘/mnt/.ix-apps/truenas_catalog’ destination: [EFAULT] Failed to clone ‘GitHub - truenas/apps’ repository at ‘/mnt/.ix-apps/truenas_catalog’ destination: fatal: destination path '/mnt/.ix-…

Ok, so for anyone who might benefit from this. I managed to transfer everything without having to rebuild anything.

Via the GUI you can setup a zfs replication task to another machine.

  • First create a pool on the new machine with the same name as the old one.
  • Create a ZFS replication task from the old machine to the new one, you can transfer your whole pool with datasets etc. keeping permissions and so on. tweak the settings as you think best.
  • When the task is complete, copy and download the configuration of your old machine.
  • Now unset the pool used by your apps and stop docker services.
  • Launch one last replication to make sure everything is copied.
  • Change the IP of your old machine to something new.
  • Restore the configuration on the new system.
  • Adjust network settings as needed.
  • You might have to import your pool and make sure that readonly is turned off
  • Choose the pool for the app and everything should just work.
2 Likes