Skip to content

command line option to use a different config file than timeshift.json #336

Description

@tusch001

Is your feature request related to a problem? Please describe.
I have a huge home folder.
For managing different situations at the moment I start timeshift-gtk and change manually destination or filters to switch between pure backups for linux and backups that include (non-hidden) config files (some blender addons), personal data and virtualbox windows images.
This is tedious and I tend to either

  • miss backuping up some data or
  • I run the danger of deleting personal data with restoring linux from a snapshot

On the command line there is already the --target-device option which is very useful but there is no way to filter the files. This could only be done by modifying (and later restoring) /etc/timeshift/timeshift.json. For me modifying the existing timeshfit.json is too dangerous as too much could go wrong.

Describe the solution you'd like
I would like to have an option for the command line to select a config file other than the default timeshift.json. With this I could add a line to the existing /etc/cron.d/timeshift-hourly so that cron can take care of different backup strategies. It should be obvious that this second backup must have a separate target device.

Alternatively a command line option to exclude files (as rsync does) would be helpful in combination with the --target-device option.

This possible future /etc/cron.d/timeshift-hourly would be my prefered solution:

# default entry (no config file option = use /etc/timeshift/timeshift.json)
0 * * * * root timeshift --check --scripted
# custom entry
20  * * * * root timeshift --check --scripted --config-file /etc/timeshift/user_config_1.json
# maybe even?
40  * * * * root timeshift --check --scripted --config-file /etc/timeshift/user_config_2.json

Describe alternatives you've considered
At the moment I use rsync in cron for personal data, but I'm not good at scripting, just one line in cron. So I only have one local backup of important personal files. I can't go back to a specific point in time to look up changes I made to some files. Once in a while I create manually other snapshots.
In addition I use lsyncd to mirror the complete timeshift mountpoint to a remote location (Yes, I know, this is likely to miss files, I would not restore the operation system, only personal data from this).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions