0

The GUI version of Timeshift offers the ability to automatically keep the last X backups:
https://raw.githubusercontent.com/teejee2008/timeshift/master/images/settings_schedule.png

As far as I can see, there is no such option using CLI:
https://github.com/teejee2008/timeshift#readme
https://manpages.debian.org/testing/timeshift/timeshift.1.en.html

Is there such an option using CLI?

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
NoExpert
  • 469
  • 4
  • 14

1 Answers1

3

You can edit the /etc/timeshift.json file to set these values. The timeshift.json file in the repo shows these values to be the defaults:

  "count_monthly" : "2",
  "count_weekly" : "3",
  "count_daily" : "5",
  "count_hourly" : "6",
  "count_boot" : "5"

P.S.: I found this approach from Issue #288 on the same Github repo.

Haxiel
  • 8,201
  • 1
  • 20
  • 30
  • Thank you. Should be better documented. – NoExpert Aug 12 '21 at 19:20
  • @NoExpert That's a fair point. There is [another issue discussion](https://github.com/teejee2008/timeshift/issues/300) which states that Timeshift has dependencies on GTK3, which is a GUI system. The program must have been conceived and built as a GUI application. That is probably is why the CLI documentation is lacking. – Haxiel Aug 13 '21 at 04:57
  • 1
    I believe `/etc/timeshift/timeshift.json` is the file to edit. `/etc/timeshift.json` shows the default valuees – NoExpert Sep 05 '21 at 19:55