How to lighten snapshots?


On some containers, the snapshots are too heavy.

Is it possible to exclude particular directories when creating a snapshot?

An alternative would be to store the heavy data on a directory mounted from the host.

I tried this with the following command, but I don’t have write permissions from the container :
lxc config device add my-container sharedstorage disk source=/home/containers/data-storage/my-container path=/data

Is there a secure solution to do this?

Thank you!

One easy way is to move your heavy data onto a LXD storage volume which you then attach into the container. This lets you configure snapshots separately on that storage volume (including the default of none at all) and anything in there will not be in the container’s own snapshot.