Hi,
is it possible to just store (tar -cf …) a snapshot folder like (/var/snap/lxd/common/lxd/storage-pools/default/containers-snapshots/c2/snap0) and import it as an backup?
I try some more or less dirty tricks, like:
create an container, make a snapshot and replace the files.
use lxc image import and create a container from the image.
Both ways “worked” but it doesn’t feel right. But with just copy the snap0 folder, it would be posible to stream directly the archive to an remote borg repo (or anything else)
Currently, I create uncompressed (borg is compressing later) “instance-only” tar’s and stream them. But that need some additional time and space I want to avoid.
Hi @cemzafer and thanks for your answer.
And yes, I already know that link but I think you misunderstood what I mean.
I want to store snapshots of an instance directly without lxc export [...] to avoid lot of disk wirtes on the lxd host.
Basicly, I want just send a snap0 folder of an instance and import it as an instance later.
lxc export (or lxc storage volume export) put all together in an temp. folder and create from there a (compressed) tar archive.
If my container is 10GB, this will write 10 GB to the temp folder and again <10GB (depending of compression) to the final tar-archiv. And as I want an uncompressed tar as input for borg, this would mean:
Backup of a 10 GB container need 20 GB diskwrite.
I also tried lxc export --compression=none --instance-only c2 - | dd of=dd_will_be_replaced_with_brog.tar to avoid at least writing of the full tar-archive but
thats created not a valid tar file.
However, this peace of dirty bash scripting seems working