Backup Setup

I recently brought my backup setup to a point that I am satisfied with. This is an overview. In two sections I answer the questions: What data do I backup? and How do I backup the data?

What

Primary copies of my data are located on my laptop and my rented virtual server.

On my laptop the data I want to backup is located almost exclusively in my home directory. There are emails, images, video files, audio files, text, source code, configuration files, etc. Initially, I kept a list of what files and directories to backup. Given that images, video files, and audio files take up more than 60% of my home directory, I soon switched to backing up all of it, cache files and all. I have not looked into backing up global configuration files, yet. The one exception is /etc/hosts, because I recently cleaned it up.

On the virtual server the situation is different. Files are distributed over various places, so I cannot just backup a whole common ancestor directory, because that would be /. Instead, only very specific files and directories are backed up.

How

I create two backups of my data; one on a external harddrive and one on a VM of friend. That lets me follow the 3-2-1 rule. There are at least three copies—two backups and the original—on at least two different mediums—originals reside on SSDs, the external harddrive is a HDD—with one backup to a remote location—the friend's VM.

To create the backups I wrote a shell script. It first copies data from the virtual server to my home directory on the laptop. Then it creates two backups of the whole home directory. They are created with BorgBackup. It creates encrypted, compressed, deduplicated backups. With deudplication, three snapshots in each location take up just a handful of GB more than my home directory, because most of the data does not change from snapshot to snapshot.

Currently, I am looking into sharing a storage box from Hetzner. It provides a BorgBackup interface. Because BorgBackup encrypts the data, I am, in this case, not worried about putting data into the cloud. The storage box would replace my use of the friend's VM.