I would like to rebuild an LXD container host from scratch - changing it from btrfs to zfs, and making it ubuntu 18.04 + lxd3. I want to save the containers, rebuild this host onto the existing hardware and restore the containers back onto it. A few hours downtime is not a problem.
One option is to build a temporary host, use “lxc move” to move the containers onto it, and then after rebuild use “lxc move” to move them back. But that all has to be done over ethernet; plus of course I need another host.
I think it may be faster if I attached some local disk (e.g. fast USB3 drive, or an extra SATA drive). Is there a safe way to export containers and their settings to such storage, and re-import them into the rebuilt system?
I found this post from 2017, it suggests (ab)using the image publish/import mechanism.
Looking at #3730 it seems that a true export/import function was added very recently. But on another system (18.04 / lxd 3.0.1), I see no “lxc export” command
Does this mean I’d have to go to 3.1/3.2 from backports to get this function?