Import into Incus of LXD tar.gz with "incus image import $LXD_generated_tarball"?

We have multiple servers hosting production on LXD containers.
The setup of the containers is a bit specific, dependent on CGroups V1, with multiple network interfaces and other caveats due to the age of the setup. We can’t risk lxd-to-incus failing and impacting the production.

The goal is to perform a snapshot and dump of each container and migrate them one by one onto a new “Incus native” server.

The backup procedure is based on some info shared in 2017 on https://discuss.linuxcontainers.org/t/backup-the-container-and-install-it-on-another-server/463:

lxc publish CONTAINER_NAME/SNAPSHOT_NAME --alias my-export
lxc image export my-export .
(…)
lxc image import TARBALL --alias my-export
lxc init my-export NEW-CONTAINER

Can Incus work with this flow using an LXD-made tarball?
incus image import TARBALL --alias my-export
incus init my-export NEW-CONTAINER

If not what is the recommended way to do so?
Thanks
Cheers

Yep, that should work fine, the image format hasn’t changed between LXD and Incus.

1 Like