Hi all, perhaps this has been asked over and over, but I could not find the right topic.
I’m currently running an old Ubuntu 18.04 with LXD 3.0.3 (ZFS storage backend) that I would like to update to newer Ubuntu. So my plan is to install Ubuntu 24.04 and Incus (and BTRFS storage backend) on a new server and then migrate from the old to the new.
When the new server is set up with Incus, can I just set it up as a remote on the old LXD instance and just do lxc copy containername new-remote:containername?
Or from the other way, set up the old server as a remote on the new and then from the new server do incus copy old-remote:containername containername?
That should be fine, though authentication works a bit differently between both releases and you’ll in general be better served by using a newer client tool, so I’d probably recommend using the incus tool to handle the copy.
I think the rough plan should be:
Ensure that both source and target are listening on the network (core.https_address is set)
Make sure that you have a client certificate on the target server by running incus remote generate-certificate
Copy ~/.config/incus/client.crt to the source server that’s running LXD
Run lxc config trust add client.crt on that system
Make sure you don’t have a trust password on the old system by running lxc config unset core.trust_password
Run incus remote add old-lxd IP-ADDRESS on the target Incus server
Confirm that things work by doing incus list old-lxd:
Try an instance copy with incus copy old-lxd:NAME local:
If you get some weird error in that last stage, try running it again with --mode=relay, but I’m not sure that LXD 3.0 supports relay mode…
It’s likely that the instances are from a very old version of Ubuntu runtime, which means that there may be no more new updates, and the PHP/MySQL services are stuck to some old and unsupported 5.x version. Personally, given the choice, I’ld export any data and reinstall the services in new and fresh Incus instances.
Actaully the container instances are well-maintained and running newer rootfs. But when trying to upgrade the host, LXD had switched to snaps and there was many issues, I rather do one container at the time than having all the chaos at once.
I’ve finally gotten around to start the migration and followed your instructions @stgraber , however, on step 6 when adding the remote on the incus server I get the following error: