Currently, a single file is used as a backup, and it is overwritten every time the database is updated. This leaves us in a vulnerable position where if that single file is corrupted, or the entire database is accidentally deleted in a single POST, the backup file will be useless.
To remedy this, we should have multiple backups, each with a timestamp. The tricky part is limiting the number of backups to a reasonable number, say the 10 newest, else the backups folder will infinitely (albeit slowly) grow in size.
Currently, a single file is used as a backup, and it is overwritten every time the database is updated. This leaves us in a vulnerable position where if that single file is corrupted, or the entire database is accidentally deleted in a single POST, the backup file will be useless.
To remedy this, we should have multiple backups, each with a timestamp. The tricky part is limiting the number of backups to a reasonable number, say the 10 newest, else the backups folder will infinitely (albeit slowly) grow in size.