Backup & Restore
Backup & Restore
Section titled “Backup & Restore”Short Summary: Procedures to ensure business continuity in case of data loss.
What to Backup
Section titled “What to Backup”- MongoDB: The primary source of truth. Contains Inventory, Policies, and User data.
- Encryption keys:
application.properties: Contains theENCRYPTION_KEY(if not using Vault).- Critical: If you lose this key, all private keys in the DB are unrecoverable.
Backup Procedure
Section titled “Backup Procedure”MongoDB Dump
Section titled “MongoDB Dump”mongodump --uri="mongodb://user:pass@localhost:27017/sslclm" --out=/backup/$(date +%F)Restore Procedure
Section titled “Restore Procedure”- Stop the Backend service.
- Restore Mongo:
Terminal window mongorestore --uri="mongodb://user:pass@localhost:27017/sslclm" /backup/2025-01-01/sslclm - Ensure
application.propertieshas the matchingENCRYPTION_KEY. - Start the Backend.