and end up getting following error after running for about an hour,
Error: Create backup: Backup storage: open /var/snap/lxd/common/lxd/backups/nextcloud/backup0: no such file or directory
Note that on checking the location mentioned above, there exists a file backup0.compressed under /var/snap/lxd/common/lxd/backups/nextcloud
Scarping through github issues, came across this particular issue but that seems to have been resolved.
Itâd be great if someone can guide me in resolving this issue and/or point in right direction.
Thanks
P.S - I am using Client/Server version 3.11, ZFS for storage and container in question is ~80 GB.
Edit 1:
Ran the same command again and this time it returned a different error, see below, Error: Create backup: Backup storage: remove /var/snap/lxd/common/lxd/backups/nextcloud/backup0
I was also running lxc monitor --pretty --type=logging --loglevel=debug which had an entry in there pointing to removal of container backup before the export operation failed.
Based on this I believe lxc export is performing a cleanup when it encounters missing backup0 file and fails right away. Also this failure leaves a dangling file backup0.compressed in /var/snap/lxd/common/lxd/backups/nextcloud directory.
If I try to reproduce your command Iâll only get a file ânextcloud_optimized.tar.xzâ in the pwd. The backup-directory stays empty because you only generated an export file.
lxc export --help
Examples:
lxc export u1 backup0.tar.gz
Download a backup tarball of the u1 container.
Flags:
âcontainer-only Whether or not to only backup the container (without snapshots)
âoptimized-storage Use storage driver optimized format (can only be restored on a similar pool)
âcan only be restored on a similar poolâ, I guess that might be the troublemaker. What means similar? Lousy documented as usual.
I understand that part and it works as expected but the problem isnât the actual generated file but the fact that running lxc export fails with following error,
Error: Create backup: Backup storage: open /var/snap/lxd/common/lxd/backups/nextcloud/backup0: no such file or directory
After the export operation fails, if I navigate to /var/snap/lxd/common/lxd/backups/nextcloud path then I do see backup0 file in there.
So my question,
Why does it say no file or directory exists when there is a file in there?
Iâd suggest to do a check with a test container with minimal size (Alpine are very smallish) if it works thatâs a 5 mn way to see if you have such a problem.
The size of the container CANâT be the trouble source. If a command works it must work for all sizes as well. If the size would be the trouble maker, the error code would be an other one. Believe me.
Check this (can only be restored on a similar pool) carefully again, please.
Noted. I am running the export operation again, without the --optimized-storage flag. Will report the findings but based on the documentation, Iâd imagine --optimized-storage flag provides for better compression (based on storage pool used) and thus be restored only on similar pool (zfs in this case).
Why should âsimilar poolâ-meaning point to zfs ? In my understanding is zfs an other layer. And if we exporting a container to a *.tar-file, what has this to do with zfs? What is a tar-ball made of ? Magic? Do we talking about containers? Ok then âŚ
Again as long as similar is not explained definitively its meaning can belong to everything. Donât trust the wizard of oz.
Be brave and focus on things beyond the curtain.
In this case Iâd suggest to check available disk space on system partition as well as available memory during the export to ensure that there is no resource problem.
In general a good idea. But in that case canât be the trouble source. If partition(space) is not enough or other things underlying youâll get an error from the underneath system because itâs escalated up from OS. Not from LXD except THEY catched this error and tossed it into their own error-handler. The same if something struggles with memory. In any case.
Thatâs the point LXD-makers come into the game. Ask them directly. And ask why they donât document those important âfeaturesâ like orphans. Maybe youâll get an answer.
Well, Iâm still here
someone asked you to post df -h but you did not; I have hinted myself that the available space on system partition mattered but you did not reply on this point.
So, Iâm not yet sure that you have at least 200 Gb free on system partition before an export.