So, I’ve found that there are a lot of ways to backup a server and anything on it, but I’m somewhat at a loss for what to use to backup everything else to that server.
For most stuff I personally can grab the files I need and back them up using a simple SMB share or rsync or whatever, but for my SO or anyone else who wants to back up is going to have a hard time. That doesn’t even cover phones - which you would want to back up fairly regularly since, you know, they get dropped. Sure, I personally can hook up tailscale and split tunnel it, and then set up sync on certain folders, but nobody else I know is going to be able to.
In a perfect world there would be a backup app that had its own little wireguard tunnel built in that could run all the traffic from wherever to my server, and would easy to set up on Android and Windows, but I don’t think that exists. So what does everyone use that does exist?
It sounds like your ask is for a recommendation to back up personal files from disparate locations to a server.
I use a self hosted Nextcloud instance for this purpose.
File synchronization is not a backup.
Nextcloud is fantastic for this especially with their desktop app!
For app settings I run pretty much everything in a container (FreeBSD jail) that can be zipped and exported easily that way. Our NAS files go to two external hard drives with rsync. One for local in house backup and one I leave at my work desk for off site backup of anything I can’t replace like the photos my wife’s taken over the last two decades.
I would recommend looking into Syncthing. I use it on all my devices and share specific folders between devices (notes mostly) and all folders back to the server. The server then backs all that up offsite as well.
Borgbackup
You are trying to solve two different, but related problems, and there are discrete solutions for both.
One is a personal cloud. You need a secure place to store your shit from multiple users and devices, from multiple networks. You’ll need a mostly static IP and dyndns or your own domain, and certificates signed by a public CA/letsencrypt.
Then, you are looking for a backup application that supports rsync or sftp/scp over ssh or vpn, that is also cross compatible (Android and PC/Linux). Point this to the service above, and you are good to go.
rsync:
#! /usr/bin/sh TIMESTAMP_LOG="/path/to/logdir/.backuplog" BACKUP_DEST="server:/path/to/backup/$1" TIMESTAMP=$(date +"%Y-%m-%d %H:$M:%S") echo "backup to:$BACKUP_DEST" echo "Backup: $BACKUP_DEST $TIMESTAMP" >> $TIMESTAMP_LOG pause rsync -auvh /path/to/homedir* rhudson@$BACKUP_DEST
This should be called with a name of a target subdirectory in BACKUP_DEST… mine are rsynca, rsyncb, rsyncc but I will change this soon for day of week based directories.
I also have certificate authentication setup on ssh on my server - that’s why no password is needed.
Someday I will set up tailscale between this machine and the server.
scp -i [certificate] local.file [email protected]:~/destination.file