@Dashrender said in Turn server into backup storage for remote servers?:
@dafyre said in Turn server into backup storage for remote servers?:
@Pete-S SSH will pretty much only be limited by the bandwidth available for you to suck in the backups.
I actually just finished a script for doing almost exactly what you said just a few days ago. I sanitized it and dropped in in Gitlab if you want to take a look.
https://gitlab.com/dafyre/linux-utils/-/blob/master/autobackup/autobackup.sh
I think I made everything a variable, but since it's sanitized, it's quite possible I missed something.
This one is for pushing backups from the server with data out to the backup server. Once you get it working, just set it up in Cron and go.
Why push instead of pull? Wouldn't pulling be safer - i.e. the webserver has no information about the backup server, so if it's compromised, it can't give anything to the attackers about the backups.
Pull is nothing but stupid complexity. It has no control over the remote system to know when backups are available and you have to pin hole each system to allow the incoming connection.
A push happens as soon as the valid backup is created, so you know that your backup is gone to location 2 almost immediately. Location 2 then sends to location 3 via a cloud sync tool. Preferably location 3 is immutable storage.