[SOLVED] How keep a weekly snapshot longer

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

[SOLVED] How keep a weekly snapshot longer

Post by Pepper-Mint-Patty »

The timeshift snapshots are set to weekly. We have installed many sw after the snapshot was made earlier this week. That snapshot we want to keep. How make sure it will not be overwritten but 1 new snapshots still will be made and kept every week?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: How keep a weekly snapshot longer

Post by cliffcoggin »

If you created the snapshot manually (On Demand) it will not be deleted. On the other hand if was automatic it will be deleted once the limit you have set in the schedule has been reached. I don't know how to change that behaviour.
Cliff Coggin
User avatar
deck_luck
Level 7
Level 7
Posts: 1577
Joined: Mon May 27, 2019 6:57 pm
Location: R-4808 North

Re: How keep a weekly snapshot longer

Post by deck_luck »

If I understand you correctly, you are trying to determine the "Weekly" snapshot retention policy.

From the TimeShift main window click the Setting button at the top. In the Settings window click the Schedule tab. Each snapshot levels has a corresponding "Keep" value? The "Keep" value is like a snapshot retention policy.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11

Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: How keep a weekly snapshot longer

Post by Pepper-Mint-Patty »

@cliffcoggin: yes thats what i mean.
@deck_luck: as i understand it you can make X snapshots a week. After that week they will be deleted, andnew will be made. Anyhow it's not what i want.

I think i have a workaround: make ondemand of the system now, call it 26 sept. Restore snapshot made earlier this week. Make ondemand of that system, name it 21 sept. Restore the 26 sept snapshot. Delete the first weekly snapshot...
Good grieve! Is there no simpler method?
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: How keep a weekly snapshot longer

Post by cliffcoggin »

Pepper-Mint-Patty wrote: Sun Sep 26, 2021 10:06 am Good grieve! Is there no simpler method?
Not in retrospect that I am aware of. My practice before any major software change is to take a manual snapshot, in addition to those in the schedule, precisely because I know it will not be automatically deleted.
Cliff Coggin
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5812
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: How keep a weekly snapshot longer

Post by Lady Fitzgerald »

cliffcoggin wrote: Sun Sep 26, 2021 11:09 am
Pepper-Mint-Patty wrote: Sun Sep 26, 2021 10:06 am Good grieve! Is there no simpler method?
Not in retrospect that I am aware of. My practice before any major software change is to take a manual snapshot, in addition to those in the schedule, precisely because I know it will not be automatically deleted.
I also manually make a snapshot before any major software change, especially kernels. The difference between us is I don't schedule any snapshots at all, including weekly; I also do those manually. I prefer to pick a time when my System is essentially idling to avoid any possible conflict.

I do my weekly snapshots first thing Monday morning when I first fire up the computer and wait until it's finished before doing anything else (it doesn't take long). I also plug in an external backup drive and make snapshot to go there. It takes less than a handful of minutes to do. When I make a snapshot between weeklies, I don't bother to also make one on the external drive.

I don't keep anymore snapshots than what will fit in the default Timeshift window. When the Window starts getting full, I'll delete one to three older snapshots (except the oldest one; I "let it mellow" for a few months before I delete it) and make a pit stop, fix breakfast, etc. while Timeshift is doing its thing. I also delete the between weekly snapshots once the next weekly is made (I can always go back to the previous weekly if necessary).

This system requires effort on my part to keep up with it. Since I have a lousy memory (actually, it's good; it's just short), I have a recurring entry on my desktop calendar to keep me in line.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: How keep a weekly snapshot longer

Post by cliffcoggin »

Well being essentially lazy, I prefer the computer to take care of itself as much as possible, with the minimum of intervention by me. The great majority of that intervention concerns backups of one sort or another, but I like the scheduled snapshots for those occasions when I forget to intervene, and having plenty of room for snapshots I don't care if they accumulate for several months. Two or three times year I will remember to delete excess kernels and redundant snapshots.
Cliff Coggin
User avatar
deck_luck
Level 7
Level 7
Posts: 1577
Joined: Mon May 27, 2019 6:57 pm
Location: R-4808 North

Re: How keep a weekly snapshot longer

Post by deck_luck »

Pepper-Mint-Patty wrote: Sun Sep 26, 2021 10:06 am ...
@deck_luck: as i understand it you can make X snapshots a week. After that week they will be deleted, andnew will be made. Anyhow it's not what i want.

I think i have a workaround: make ondemand of the system now, call it 26 sept. Restore snapshot made earlier this week. Make ondemand of that system, name it 21 sept. Restore the 26 sept snapshot. Delete the first weekly snapshot...
Good grieve! Is there no simpler method?
Yes, as cliffcoggin stated the manual on demand snapshot will not be deleted until you purge them. If you are making a lot of software changes you need to make sure your TimeShift destination has the appropriate amount of free space to contain the many weekly snapshots.

I was not sure if you were doing manuals or schedules hence, the Schedule "Keeps" setting was previously mentioned.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11

Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
mikeflan
Level 17
Level 17
Posts: 7136
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: How keep a weekly snapshot longer

Post by mikeflan »

Good grieve! Is there no simpler method?
Yes, there is. Put a comment on the snapshot and it sticks around:
ts.png
Last edited by mikeflan on Tue Sep 28, 2021 12:23 pm, edited 1 time in total.
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: How keep a weekly snapshot longer

Post by Pepper-Mint-Patty »

Well that works remarkable simple! Thanks mikeflan.
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
MAlfare

Re: How keep a weekly snapshot longer

Post by MAlfare »

Pepper-Mint-Patty wrote: Sun Sep 26, 2021 6:42 am The timeshift snapshots are set to weekly. We have installed many sw after the snapshot was made earlier this week. That snapshot we want to keep. How make sure it will not be overwritten but 1 new snapshots still will be made and kept every week?
You made them automatically, they will be deleted automatically.
Any automatic, which cannot be deactvated is a bad thing, starting from the shutter speed of my camera to........
I make my snapshots manually, and I remove them manually, so I cannot test this:

You have the following directories:
/timeshift/snapshots (with your snapshots)
and
/timeshift/snapshots-boot
/timeshift/snapshots-daily
/timeshift/snapshots-hourly
/timeshift/snapshots-monthly
/timeshift/snapshots-ondemand
/timeshift/snapshots-weekly
containg soft links to your snapshots.

What I would try, is to move the link to your snapshot from /timeshift/snapshots-weekly to /timeshift/snapshots-ondemand
And edit the tag in its info.json to "tags" : "ondemand",

For science one must make sacrifices (but not every). :D
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: How keep a weekly snapshot longer

Post by cliffcoggin »

mikeflan wrote: Sun Sep 26, 2021 5:09 pm
Good grieve! Is there no simpler method?
Yes, there is. Put a commend on the snapshot and it sticks around:
That surprises me. Have you actually tested it Mike?
Cliff Coggin
mikeflan
Level 17
Level 17
Posts: 7136
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: How keep a weekly snapshot longer

Post by mikeflan »

Have you actually tested it Mike?
Maybe not real rigorously, but in all the time I've been using it the commented snapshots stick around until I delete them.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11180
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: How keep a weekly snapshot longer

Post by AZgl1800 »

cliffcoggin wrote: Sun Sep 26, 2021 11:09 am
Pepper-Mint-Patty wrote: Sun Sep 26, 2021 10:06 am Good grieve! Is there no simpler method?
Not in retrospect that I am aware of. My practice before any major software change is to take a manual snapshot, in addition to those in the schedule, precisely because I know it will not be automatically deleted.
I am a "me too" person.

IF, I am about to install software that I am not positive that I will keep it, or even like it, I make an On Demand Timeshift backup, then I label it Before Bad Software

if all goes well, it can stay there forever unless I delete it.
if not, then I do a Restore from that point, and life goes on.

other than that I keep a fairly short list

TS.png
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: How keep a weekly snapshot longer

Post by Pepper-Mint-Patty »

Thanks MAlfare, i like the idea!
Just copied the snap. In due time will restore it. Will see if both still work.
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: How keep a weekly snapshot longer

Post by cliffcoggin »

mikeflan wrote: Mon Sep 27, 2021 4:25 pm
Have you actually tested it Mike?
Maybe not real rigorously, but in all the time I've been using it the commented snapshots stick around until I delete them.
That's good to read. I'll test it myself.
Cliff Coggin
MAlfare

Re: How keep a weekly snapshot longer

Post by MAlfare »

Pepper-Mint-Patty wrote: Mon Sep 27, 2021 5:35 pm Thanks MAlfare, i like the idea!
Just copied the snap. In due time will restore it. Will see if both still work.
I am in doubt if it was good idea to copy a snapshot.
How did you copy?
I am afraid, you could loose owner, group, rights, and files /directories because of missing rights....
rsync should be able to preserve those things.
My idea was totally different: let the snapshot in peace and move the link to it from weekly- to manually-directory
User avatar
Pepper-Mint-Patty
Level 5
Level 5
Posts: 965
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: How keep a weekly snapshot longer

Post by Pepper-Mint-Patty »

MAlfare wrote: Tue Sep 28, 2021 6:29 pm My idea was totally different: let the snapshot in peace and move the link to it from weekly- to manually-directory
...move the link to your snapshot from /timeshift/snapshots-weekly to /timeshift/snapshots-ondemand
And edit the tag in its info.json to "tags" : "ondemand",
Right, got it :)
If guns don't kill, then OxyContin doesn't either, heroin isn't addicitve and fairy tales are real.
19.2 Cinn, Nemo
cliffcoggin
Level 8
Level 8
Posts: 2297
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: How keep a weekly snapshot longer

Post by cliffcoggin »

mikeflan wrote: Sun Sep 26, 2021 5:09 pm
Good grieve! Is there no simpler method?
Yes, there is. Put a comment on the snapshot and it sticks around:
ts.png
I can confirm, after a few weeks on test, that simply adding a comment to a scheduled weekly snapshot prevents it from being automatically deleted.
Cliff Coggin
Locked

Return to “Beginner Questions”