[Help] structure of exported container tarball documentation

Hello dear colleagues,

After exporting a container to a tarball, I would like to change some of its metadata before I import it on another LXD host. Is there a recommended way of doing it? I assume the metadata is stored in configuration files in tarball, but there are too many files inside for me find them myself.
The concrete case is that a container exported with LXD 5 cannot be imported to LXD 4 because of the Unknown configuration key: volatile.uuid.generation. (See forum post)

My hope is that I will be able to remove this key from the exported container’s configuration tarball and complete the import on LXD 4.

I was unable to find documentation on the tarball’s structure, can anybody help?

Metada in an exported container tarball is located in

backup/index.yaml
backup/container/backup.yaml
backup/container/metadata.yaml
backup/snapshots/<SNAPSHOT_NAME>/backup.yaml
backup/snapshots/<SNAPSHOT_NAME>/metadata.yaml

(For any amount of snapshots.)

It is possible to extract and inspect the contents of these yaml files with the usual tar commands.

2 Likes