What to do when "lxc move" gives you "Error: Migration API failure: Instance has backups" <SOLVED>

Question is title. I had an export running of a particular container and something went wrong, not sure what, and I had to kill it. Now, the container appears welded to its host and refuses to move, giving the error above. I’ve searched about and so far can find no reference to the message, aside from possibly in the code itself.

So, how does one clear this issue and what is it actually referring to?

Hi

Can you run the following please and show the output:

sudo lxd sql global 'SELECT * FROM instances_backups'

Also the output of:

sudo ls -lR /var/snap/lxd/common/lxd/backups

Here’s the sanitized output:

±----±------------±------------------±---------------------±---------------------±---------------±------------------+
| id | instance_id | name | creation_date | expiry_date | container_only | optimized_storage |
±----±------------±------------------±---------------------±---------------------±---------------±------------------+
| 44 | 314 | XXXXXXXXX/backup0 | 2020-12-06T17:57:59Z | 2020-12-07T17:57:59Z | 0 | 0 |
| 56 | 214 | YYYYYYYYY/backup0 | 2020-12-06T19:12:26Z | 2020-12-07T19:12:26Z | 0 | 0 |
| 119 | 288 | TROUBLE/backup0 | 2020-12-07T05:39:26Z | 2020-12-08T05:39:26Z | 0 | 0 |
| 135 | 233 | ZZZZZZZZZ/backup0 | 2020-12-07T16:24:59Z | 2020-12-08T16:24:59Z | 0 | 0 |
±----±------------±------------------±---------------------±---------------------±---------------±------------------+

Where TROUBLE is the one which is giving the issues

I suspect the others that are listed in that would give issues as well. Just haven’t tried to move them yet

OK so running this should get rid of it:

sudo lxd sql global 'DELETE FROM instances_backups where id = 119'

That sorted it, thanks :slight_smile:

1 Like