Metadata tarball is missing metadata.yaml

I have exported a container using the LXC API endpoint /instances/name/backups/export, however when i try to import using lxc image import a1-1591635854.tar.gz --alias a1-import

I get the following error

Error: Metadata tarball is missing metadata.yaml

What am I missing?

Do you get the same issue if you use the lxc export CLI?

Also what versions of lxd are available?

No I don’t get the same issue with the CLI, I am able to import fine.


I guess I am using the API to export a backup and the CLI to export a container as an image, which are two different things.

Is there a specific command for importing backups generated using the API backup export endpoint?

The commands to use are:

lxc export <container> backupfile.tar.gz
lxc import backupfile.tar.gz

Thanks, it worked perfectly - I totally missed the obvious, i was following an old discussion on backing up and restoring, when there was no need too. doh!

Is there any script to create it automatically backup backupfile.tar.gz file for the listed container in every night? Thnx

@hafijaa This article has some bash goodness

1 Like