LXD migration with OS change

Hey there,

I am planning to switch both the OS and the container solution, ideally the same time.
At the moment I am using Ubuntu Jammy with LXD from snapstore and I plan to switch to Debian Bookworm and Incus.

What would be the best way to proceed? Can I use LXC to export my containers and simply import them later to Incus after installing Debian? Or do I have to use the lxd-to-incus migration script while still on Jammy and export them?


I’d probably do it in two steps:

  • Move from LXD to Incus on Ubuntu 22.04
  • Save /var/lib/incus and any storage that you’re using
  • Reinstall
  • Restore /var/lib/incus and your storage

You could also go with the export route but in that case, make sure to also note down things like networks, profiles, projects, … as export only gets you the container or volume you’re exporting.