I want to create a backup of my Linux system, including user files, from the command line. I tried using Timeshift but it doesn’t have a CLI argument to include a folder.
I found a guide on dev.to that explains how to use Timeshift from the command line, but it doesn’t mention how to include user files. According to ItsFOSS, Timeshift is designed to protect system files and settings, not user data, so user home directories are excluded by default.
I came across a list of backup programs for Linux on Slant, and BackInTime appears to be the best.
Has anyone used BackInTime to backup the whole system including user files? Are there any other tools that you would recommend?
Edit: would also be nice if it had similar features to Timeshift, like incremental snapshots, weekly snapshots, list, restore and delete snapshots, etc.
I like separating backups and snapshots as timeshift recommends. Backups are better handled by a different process copying your files to a remote location (pc failure, house fire, etc.). Lastly, backups are personal, so you gotta do what works for you - whatever makes them happen is good enough in my opinion ;)
My setup (not perfect, but it works for me). I keep one snapshot only - but it is the entire drive including the home folder. It’s really close to a disk image minus the mount folders. This is done to a second local disk via rsync. The arch wiki entry on rsync has the full rsync command for this operation called out. I run this right before a system update.
Backups go to my NAS. Synology in my case. They have a cloud software package like iCloud, OneDrive, etc, except I run it on the NAS and I’m only limited on storage by what drives I throw into it. That software scoops up my user folders on all my PCs and I set it to keep the 10 latest versions.
Then since my NAS is inside my house, I back the entire NAS up to an external hdd and sneaker net it to work and keep it in my office drawer. This protects me from fires and whatnot. I do this monthly. This is a completely manual process.
Some people have accused me of insanity-but it’s really not that hard. I don’t worry about losing pictures of my kids, and it’s aged well with my family (for example, my daughter doesn’t worry about losing stuff while she’s in college - if she writes a paper, 10 copies are kept here at home on the NAS automatically). And none of it was hard to set up, maybe just a bit pricey for the NAS (but it’s got a lot of other super useful things going for it)
So ya, I’d recommend letting timeshift do its thing for snapshots, and I’d rethink what you’re trying to do for backups. I strongly believe they are two different things.