Restoring a backup via the API

I am trying to restore a backup for an instance via the API where the backup had a different name so I am trying to overwrite it, however the header X-LXD-name seems to be ignored.

curl -X POST -k -H "Content-Type: application/octet-stream"  -H "X-LXD-name: c1" --data-binary @tmp.gz --cert server.crt --key server.key https://192.168.1.160:8443/1.0/instances

What version of LXD are you using?

Ubuntu 20.04 and LXD 4.04.

That’s the issue then, this is a recent feature, you need at least 4.7 for that.

snap refresh lxd --channel=latest/stable will move you from the LTS channel to the latest release one.

Thanks. I am not familiar with the release process, but when would that start appearing in updated systems using the normal channel?

The 4.0 LTS release branch does not generally get new features, it is a stable release so just gets bug fixes. The feature releases 4.x get new features but are only supported until the next feature release.

See https://linuxcontainers.org/lxd/getting-started-cli/#choose-your-release for more info.

1 Like