Skip to content

Backup & Restore

Short Summary: Procedures to ensure business continuity in case of data loss.

  1. MongoDB: The primary source of truth. Contains Inventory, Policies, and User data.
  2. Encryption keys:
    • application.properties: Contains the ENCRYPTION_KEY (if not using Vault).
    • Critical: If you lose this key, all private keys in the DB are unrecoverable.
Terminal window
mongodump --uri="mongodb://user:pass@localhost:27017/sslclm" --out=/backup/$(date +%F)
  1. Stop the Backend service.
  2. Restore Mongo:
    Terminal window
    mongorestore --uri="mongodb://user:pass@localhost:27017/sslclm" /backup/2025-01-01/sslclm
  3. Ensure application.properties has the matching ENCRYPTION_KEY.
  4. Start the Backend.