Migrate deb 3.0 to snap 4.0

I have a server running ubuntu 18.04.4 with lxd at version 3.0.3. Recently I upgraded my laptop to kubuntu 20.04, and thus lxd there is now at snap 4.0.6. So i am not compatible anymore with my server.
I know there is am upgrade possibility, but i wanted to check again, because this is an operational server with 20+ containers. Are these commands sufficient:
snap install lxd
What exactly is touched by this migrate? The database and the container filesystems?


If the LXD snap isn’t installed already on the new system then running sudo snap install lxd will put you on the stable release channel rather than the long term support (LTS) 4.0 channel.

So if you’re looking to have a more modern system but still follow a similar release cadence as 3.0 LTS branch then I would recommend you switch to the 4.0 LTS channel using:

sudo snap install lxd --channel=4.0/stable
sudo lxd.migrate

I am not sure of the specifics of the lxd.migrate command but my understand is that it updates the database and some file locations, but largely leaves your containers untouched. But as ever, certainly worth having a fresh backup before attempting any major upgrade.

Also see Managing the LXD snap for more info on the LXD snap.