Score:1

How can I put more time or even see the time set on "snap set system snapshots.automatic.retention="?

cn flag

I am fighting vs snapshots. In https://snapcraft.io/docs/snapshots says that by default the time of the autosaves is 31 days, I want to set it to forever, but it just let me put values of hours, not even days...
I want to know the value already set on "snapshots.automatic.retention=" and how I can set it to forever

sa flag
How do we set the retention period to 60 days? I've tried `$ sudo snap set system snapshots.automatic.retention=60d error: cannot perform the following tasks: - Run configure hook of "core" snap (run hook "configure": snapshots.automatic.retention cannot be parsed: time: unknown unit d in duration 60d) ` and looked for specific time parsing. I've failed. Are only hours, h, supported?
Score:1
pl flag

I don't believe this is possible, having looked at the source code for snapd, specifically the section dealing with snapshots.

However, if you want to retain the snapshots for a long period, I'd recommend just backing them up separately. Snapshots taken by snap whether automatic or manual, are just plain zip files in /var/lib/snapd/snapshots.

For example, I just did snap install null (an empty snap I published) and snap remove null. Here's the snapshot:

root@localhost:/var/lib/snapd/snapshots# ls -l
total 4
-rw------- 1 root root 812 Feb 13 23:30 2_null_null_3.zip

Back that up and you're done.

Pixie avatar
cn flag
Thanks. How can I set "snapshots.automatic.retention=" again to it's default value?
pl flag
Run `snap help set` to find out you need an exclamation point. So `sudo snap set system snapshots.automatic.retention!`
Score:0
sa flag
sudo snap set system snapshots.automatic.retention=no

will disable deletion, according to the documentation.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.