[keyserver] Add maxDirSizeMiB to BackupConfig
Summary:
This config allows a user to specify a maximum space usage of the backup directory. This should resolve ENG-1234.
We will always keep at least one backup, ignoring maxDirSizeMiB if the single most recent backup exceeds it. Otherwise we will delete old backups until the usage falls below the max.
Depends on D4282
Test Plan:
- I tested setting maxDirSizeMiB to fit 2.5 backups, then changed cron.js so it ran a backup soon. I confirmed after running that there were two backups, that they were the two most recent, and that one of them was new.
- Then I tested setting it to some low number, smaller than one backup. Made sure after running that there was precisely one brand new backup.
Reviewers: atul, yayabosh
Reviewed By: atul
Subscribers: palys-swm, Adrian
Differential Revision: https://phab.comm.dev/D4283