Timeshift: Possible to change time of daily snapshot?

Created on 11 Nov 2017  Â·  8Comments  Â·  Source: teejee2008/timeshift

Is there a way of changing the time it runs the snapshot

mine insists on running daily at 19:00 which is really annoying as it slows the system down every day at that time for 20 minutes. .

would much rather it did it in the night

question

Most helpful comment

Sorry to resurrect this issue, but is it possible to select some "do not backup" times? While I appreciate the random-ish schedule to ensure the backup, it's quite annoying when it happens in the middle of the working day (every day at 15h here).

Even something to check if I haven't used the computer in X minutes or so would help, as I often forget that timeshift is doing something and go hunting for processes that are hogging the CPU.

And while you might say that it was intended for rare computer users, this utility now comes in the Mint 18.3 version, which implies a lot of different users. I really like this tool, as it has saved my life twice already, so I want to help making it better.

All 8 comments

It would be nice to be able to configure that.
I do regular backups of the timeshift directory (with rsync) and would like to have a guarantee timeshift not to produce a new snapshot at that time.

There's a single cron job that runs every hour and creates new snapshots.

Timeshift is designed for casual users who use their systems for few hours daily. The hourly job ensures that daily/weekly/monthly snapshots get created whenever system is running. Scheduling at a fixed time will result in missed snapshots.

If you have the need to run at a specific time, simply disable all scheduled backups from Timeshift settings, and do backups manually by creating a cron task.

For example, to create snapshots daily at 19:00, create a file with below contents and save it as /etc/cron.d/timeshift_daily_7pm.

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""

0 19 * * * root timeshift --create --tags D --scripted

ok. ive disabled daily backups. created a cron file for 0200
will see if that behaves

will that adhere to "keep x number of backups" settings or will i need to manually delete from time to time

Hi Tony,

Sorry for answering late, I just found your mail in my spam folder.

Thanks a lot for your answer!

Is there some kind of manual describing the CLI ? I would highly appreciate. I was able to find some example in the web but no such thing as a systematic description.

Thanks again and best regards,

--Peter

Von: Tony George [mailto:[email protected]]
Gesendet: Samstag, 18. November 2017 05:35
An: teejee2008/timeshift timeshift@noreply.github.com
Cc: discoverSlow peter.bader@gmx.de; Comment comment@noreply.github.com
Betreff: * GMX Spamverdacht * Re: [teejee2008/timeshift] Possible to change time of daily snapshot? (#64)

There's a single cron job that runs every hour and creates new snapshots.

Timeshift is designed for casual users who use their systems for few hours daily. The hourly job ensures that daily/weekly/monthly snapshots get created whenever system is running. Scheduling at a fixed time will result in missed snapshots.

If you have the need to run at a specific time, simply disable all scheduled backups from Timeshift settings, and do backups manually by creating a cron task.

For example, to create snapshots daily at 19:00, create a file with below contents and save it as /etc/cron.d/timeshift_daily_7pm.

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""

0 19 * * * root timeshift --create --tags D --scripted

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/teejee2008/timeshift/issues/64#issuecomment-345417739 , or mute the thread https://github.com/notifications/unsubscribe-auth/AfvhCWk2tRpd1lmvOk_rsAr42wHUDumUks5s3l5sgaJpZM4QamUM .

Sorry to resurrect this issue, but is it possible to select some "do not backup" times? While I appreciate the random-ish schedule to ensure the backup, it's quite annoying when it happens in the middle of the working day (every day at 15h here).

Even something to check if I haven't used the computer in X minutes or so would help, as I often forget that timeshift is doing something and go hunting for processes that are hogging the CPU.

And while you might say that it was intended for rare computer users, this utility now comes in the Mint 18.3 version, which implies a lot of different users. I really like this tool, as it has saved my life twice already, so I want to help making it better.

@Yuri-M-Dias The thing is - there are a million ways to do the scheduling. It is not possible to create a GUI that will satisfy everyone. Everybody's needs are different.

Ultimately everything is scheduled as a cron job. Take a look at some of the popular cron GUIs that exist and use any one of them to do the scheduling.

As mentioned previously you only need to run the command: timeshift --create --tags D --scripted to create a snapshot at scheduled time. D can be replaced with H,W,M etc to create hourly, weekly and monthly snapshots. The "max snapshots to keep" is still applicable when you create snapshots manually. If you tag it as D and the daily snapshot limit is exceeded then then the oldest daily snapshot is removed and so on...

I see the file
/etc/cron.d/timeshift-hourly
but it has never once run its automatic backup?
I have set 14 x daily , 4 weekly , 2 monthly

what determines if a snapshot is needed? I have been through many updates

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""

0 * * * * root timeshift --check --scripted

Proposed solution with timeshift --create --tags D --scripted works fine for "N daily backups" scheme, thanks.

Is there any way to get a more complex scheme with a single set of backups? For example, mark every 7th as "DW", every ~30th as "DM". Timeshift does this in its default automatic mode, if all types of backups happen to be scheduled to the same hour.

What I tried:

  1. timeshift --create --tags D,W,M --scripted just marks every backup as DWM
  2. timeshift --check --tags D,W,M --scripted prints "Scheduled snapshots are disabled - Nothing to do!" and exits
  3. timeshift --check --scripted + manually enabling these backup types in /etc/timeshift.json seems to do what I want, but causes Timeshift to add back timeshift-hourly cron task after each backup (this probably could be overcome by wrapper script to delete it afterwards) and each GUI invocation.
Was this page helpful?
0 / 5 - 0 ratings