Is there a way to unset the expiry of an existing snapshot?

The case is quite simple: I have automatic snapshots and expiry set. One container has a historical snapshot that I want to keep longer than its expiry. Is there a way to do that? I am using ZFS.

Something like

lxc snapshot unset c1/snap7788 expires

I am aware of two alternative approaches:

  1. Restore the snapshot and re-snapshot without expiry - but due to being on ZFS I will loose the current state unless I clone it first

  2. Just do a ZFS send and restore the snapshot on a new container when I want to use it

Likely also editing the database directly would do the trick?

lxc config edit <instance>/<snapshot> and then modify expires_at should do the trick.

1 Like

That’s brilliant, thanks! I never thought of snapshots as configuration targets.

1 Like

Yes most of the configuration of a snapshot is read-only, but that key is editable.