Backup part of a repo to another remote repo?

Hi for some time I have run restic repo to another local older laptop. That died some weeks ago so I want to make a more robust backup scheme.

My plan is to have an external disk connected to a rPi and do sftp (or rest) backup of / (with the normal excludes) to this disk as long as im connected to my home WiFi and is not running on battery. I created a wrapper script for this and this seems to be very doable. (just checking iwgetid -r and /sys/class/power_supply/AC/online, and if i actually can reach the backup destination)

But I would also like to backup the most important part (maybe just ~/work, or maybe all of $home but excluding big, but not work critical folders like ~/Pictures, ~/Music and ~/Videos ) to a server in the office so I have some offsite backup of it.

I know I can do this fairly easy with starting a second backup job that is more limited or have more excludes. But I was wondering if I could filter the full local backup on the rPi and have a backup job running on the rPi that uploads the important folders to the remote server. This way, as long as the full backup runs while I’m connected to AC I don’t need to have a second slower backup job running on the laptop as there is a considerable difference in upload speed on local wifi network and the backup running over the internet.

I prefer starting backup jobs from systemd/cron as i would absolute forget about it if i have to initiate it manually, so thats why i need a wrapper script that checks that I’m on my home network and not on battery.

How would you go about getting a remote backup running in this situation?

If you want my opinion, you are only overcomplicating things. Add a second backup job and you’re done. There’s no reason to make your second backup job depend on the first one and its storage. Better to have two totally independent backups.

4 Likes