Solved How to force Timeshift to back up my /home dir

Solved issue

hal_sk

Member
Joined
May 25, 2020
Messages
32
Reaction score
8
Credits
329
Hello,
I am unable to set my Timeshift CLI on Debian to back up my "/home" directory. I tried to do it via modifying "/etc/timeshift/timeshift.json" config file, but with no success.
I tried to add:
"include_home" : "true",
"include_hidden" : "true",
"include" : [
"/home/**"
]
I have tried to add other flags too with support of AI bots, which are pretty useless in this situation. And I am unable to find any official documentation to this config file ideally with list of all possible properties and values I can use there.
I know Timeshift is meant to backup system files mostly, but I have couple small but important files inside "/home" directory I need to backup.
 


if you were doing your snapshots via the gui, I would point out the info in the screenshot below: It is taken from my PC.

1755711996824.png

Timeshift does indeed back up the home folder.

What I am not familiar with is how that achieved via the cli, however, our resident Timeshift expert, @wizardfromoz will most definitely know.
He will be notified of this thread.
You can expect to see him in approx 7 hours. Like myself he is in Australia. (Timezones/differing times etc
 
This is not your solution, but may be of interest anyway:


In particular: Timeshift allows users to configure automated snapshot schedules (e.g., hourly, daily, weekly) and retention policies (how many snapshots to keep). These settings can be managed via both the GUI and command-line. Users can also specify custom include/exclude filters to tailor what data is included or excluded from snapshots beyond the defaults.

I would conclude from the above that what you wish to do is achievable.
 
DO NOT use this without having a Timeshift snapshot in place..... It is only a GUESS on my part

sudo timeshift --create --include all files
 
if you were doing your snapshots via the gui, I would point out the info in the screenshot below: It is taken from my PC.

View attachment 27439
Timeshift does indeed back up the home folder.

What I am not familiar with is how that achieved via the cli, however, our resident Timeshift expert, @wizardfromoz will most definitely know.
He will be notified of this thread.
You can expect to see him in approx 7 hours. Like myself he is in Australia. (Timezones/differing times etc
Thanks for inspiration. I have set GUI Timeshift on other computer to include "/home" directory and then inspected resulting "/etc/timeshift/timeshift.json" config file.
And this is what I have found in "exclude" directive:
"+ /home/hal/***",
I have used this syntax on CLI machine and it worked! User dir in home dir was snapshoted too.
What a weird thing to include include condition in exclude directive.
I hope this helps many other people including me in the future when I forget the solution.
 
Well Done.!
 
You can expect to see him in approx 7 hours.

6 hrs 15 mins as the flying carpet flies, but it seems that I am not required.

@hal_sk when you are confident that the solution works, you can mark it as such by going to your first post, and do as follows

Near bottom left of the post click Edit - (No Prefix) - Solved

Cheers

Wizard
 


Follow Linux.org

Members online


Top