This is related to this topic, Lxc copy --refresh fails, which got resolved. (Thanks Thomas.)
For the purpose of backing up containers, I have a script that runs this:
lxc copy --refresh [container] [remotehost]:[container]
It works great.
My containers are configured to create snapshots daily, so every day each container has a new snapshot called something like daily_20230423_011111. However, when I manually create a snapshot and call it something like “pre-install-new-software”, the nightly lxc copy --refresh
command fails with this:
Error: Failed instance creation: Error transferring instance data: Failed creating instance on target: Failed to run: btrfs receive -e /var/snap/lxd/common/lxd/storage-pools/default/containers/migration.4035416621/pre-install-new-software: exit status 1 (ERROR: cannot find parent subvolume)
I have been able to fix it only by deleting the backup container and creating a fresh copy by running:
lxc copy [container] [remotehost]:[container] --stateless --allow-inconsistent
This is not a show stopper for me, but it would be nice to have it just work when I manually create snapshots.
Any ideas on how to fix this?
Thanks.