Syncthing Real Time Backups

I really enjoyed the recent video titled “How I Use Syncthing for Real Time Backups [YouTube Release]”. If I am understanding the video correctly, this is more for an end user account being able to backup personal data. I was hoping to take this to a server level and do a real time backup of system configuration files such as crontabs, hosts, resolv.conf, etc. I am not able to figure out a way to do this because the files span multiple directories and in some cases, mount points.

So I though I would ask for thoughts about doing this or should I use other methods?

Most all of my Linux servers are all virtual machines that get fully backed up so I don’t really need that, but if you do need to backup things somewhere such as /etc you could:

#!/bin/bash

# Set backup filename with date
BACKUP_FILE="/backup/etc-backup-$(date +%F-%H%M).tar.gz"

# Create the backup directory if it doesn't exist
mkdir -p /backup

# Create the compressed archive
tar -czf "$BACKUP_FILE" /etc

echo "Backup completed: $BACKUP_FILE"

Also worth noting that you can use GIT or other tools for change management as well.