Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tusch001 opened this issue Sep 22, 2024 · 0 comments
Open

Comments

@tusch001
Copy link

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).

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

No branches or pull requests

1 participant