[keyserver] Script to scp backups over from a server
Summary:
The Docker host can generate backups, but the backups are useless if they're stored in the same place.
This script is intended to be run on a different machine. It will scp the latest backup from a source folder and make sure disk usage doesn't exceed some limit in the destination.
Test Plan:
- I copy-pasted this script to my personal server, where I ran it to scp files over from my keyserver on AWS: bash/scp-backup.sh backups backups
- I created dummy backups in the destination to fill up disk space
- I made sure that when disk space was exceeded, the oldest backups got deleted first
- I made sure that the cleanup never deleted all backups (there was always one left, even if it's bigger than the limit)
Reviewers: atul, yayabosh
Reviewed By: yayabosh
Subscribers: palys-swm, Adrian
Differential Revision: https://phab.comm.dev/D4288