I had to dowgrade from LXD 5.21 to 5.20 because I don’t have the right version of ZFS and I can’t upgrade the kernel right now. When downgrading, it will not start because database has been upgraded from version 69 to 73.
I managed to successfully downgrade LXD and the database with the following steps (use with caution):
- Check revision of 5.20 version.
snap list lxd --all
Name Version Rev Tracking Publisher Notes
lxd 5.21.1-43998c6 28155 5.20/stable canonical✓ disabled,held
lxd 5.20-f3dd836 27049 5.20/stable canonical✓ held
-
Revert to 5.20.
snap revert lxd --revision 27049
-
Stop lxd
snap stop lxd
-
Backup current database version 73
cp -a /var/snap/lxd/common/lxd/database/global ~/lxd-db-global-backup-20240411-version73
-
Restore database version 69
rm /var/snap/lxd/common/lxd/database/global/*
cp -a /var/snap/lxd/common/lxd/database/global.bak/* /var/snap/lxd/common/lxd/database/global/
- Start LXD
snap start lxd