How can I import lxc containers back from the snapshots the lxc create just before the `lxc snap` is removed?

Hi guys. I have the following situation:

I have an Ubuntu 22.04 node, which used to have lxd v5 installed through snap. It used to have 3 containers, at the moment of remove the lxd using the snap remove lxd it did take a snapshot of all the containers, but when I try to import those snapshoted containers I got some errors.

First, the snapshots were deliver to me in .zip format, which when I try to import using the lxc import file_name.zip I get the Importing instance: 100% (108.71MB/s)Error: Unsupported compression error, weird because as I pointed I got the snapshots in .zip format.

So I needed to extract it and then compress it again using tar (tar -czvf containers.tar.gz file_contains_extracteds/)

Once I got the correct format, then I try to import it, but I get the following error:

lxc import containers.tar.gz
Importing instance: 100% (701.66MB/s)Error: Backup is missing at "backup/index.yaml"

When I look into the extracted .zip file I get:

ls
25112  archive.tgz  common  meta.json  meta.sha3_384  user

And inside the common there are all the container’s folder:

ls common/lxd/storage-pools/default/containers/
monitor  orch1  vrouter

So, the question is: How can I import lxc containers back from the snapshots the lxc create just before the lxc snap is removed?

Welcome kCyborg to the community.

LXD support has moved to LXD - Ubuntu Community Hub, and this forum remains for LXC and all other related projects (like lxcfs, Incus, etc).