What's your primary backup strategy for the /home directory in Linux?

No readers like this yet.
No readers like this yet.
Linux keys on the keyboard for a desktop computer

I frequently upgrade to newer releases of Fedora, which is my primary distribution. I also upgrade other distros but much less frequently. I have also had many crashes of various types over the years, including a large portion of self-inflicted ones. Past experience with data loss has made me very aware of the need for good backups.

I back up many parts of my Linux hosts but my /home directory is especially important. Losing any of the data in /home on my primary workstation due to a crash or an upgrade could be disastrous.

My backup strategy for /home is to back up everything every day. There are other things on every Linux system to back up but /home is the center of everything I do on my workstation. I keep my documents and financial records there as well as off-line emails, address books for different apps, calendar and task data, and most importantly for me these days, the working copies of my next two Linux books.

I can think of a number of approaches to doing backups and restores of /home which would allow an easy and complete recovery after a data loss ranging from a single file to the entire directory. Which approach do you take? Which tools do you use?

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
782 votes tallied
Backup everything and just restore what you need.
37% (290 votes)
Backup everything and restore everything.
15% (114 votes)
Backup only the data files you do want and restore all that was backed up.
15% (114 votes)
Backup data and configuration files you want and restore everything.
17% (133 votes)
We don’t need no stinkin’ backups!
13% (101 votes)
Other (Explain in the comments below.)
4% (30 votes)

Results

Comments

13 Comments

I backup /home using Cronopete which I've really come to love. I don't backup everyday but do backup frequently. Thanks for the article David.

I do nightly rsync backups to an external drive, but I exclude folders that don't matter (cache) for recovery and folders that are already backed up elsewhere (Dropbox/).

Same here - daily rsync --delete for easy recovery and daily rsync without deletion for archiving, both to an external host

Having /home in a separate partition is the first thing I did, helps a lot! /home is then synced over to NAS and NextCloud. Replication is not backup, but I've never needed to undelete a file or restore a previous version.

I use Veeam backup agent, and just do an image backup of the whole machine to an external CIFS share. The good thing is that Veeam mounts the CIFS share, does the backup and then switches off the PC, all this scheduled at 23:30. That way the PC switches off alone, and my backups are protected from virus corruption or encryption.

I usually only do an "official" backup when I upgrade Fedora. I do this from the command line, by going up to the /home directory, then typing
sudo cp -av gregp /media/myexternaldrive
-a if for archive, so it saves the timestamps for files. One of the fhings this method does is also backup the dot-files and dot-directories, where there are things like my browser and email settings and old emails.
Otherwise I selectively copy files for safekeeping to other computers in my home via the network.

Nextcloud grabs everything in home, and the mobile. Backs everything up to an on-site media pc. The mobile also sends call recordings and photos to separate folders and are then mounted on the desktop. It's possible to access the desktop backup on the mobile, but it has to intentional and from the lan side only.

For config Mackups + syncthing onto my other systems

Data is stored outside of my home on the network at present.

Backup config and a few files: dejadup+dropbox.

I keep my home in a different drive which I never delete.

Local git repo for incremental is essentially free, nightly auto commits with cron if there are any changes followed by rsync to remote or git push if you wanted to be fancy.

I'm a fan of Timeshift. I'm actually glad a lot of distros started bundling it.

It uses rsync, and it creates hardlinks to the files. Do the initial backup can be large and slow, but subsequent ones are really fast.

I have /home on a separate physical disk. I was using Own Cloud for backups, but I am in the process of switching to Next Cloud for my laptop backups.