We need to add a backup system for local databases.
The final implementation does the following:
- It runs every hour, as well as on exit before trying to stop threads (a potential cause of database corruption).
- It dumps the database into a "backups" folder, and appends a timestamp to the original filename.
- It deletes backups older than 24 hours upon saving a new one.
- In case of database error on startup, it restores the most recent backup.
- causes
-
NXDRIVE-1574 DAO has no lock when Drive attempts to restore a db backup
- Resolved