Skip to main content
A robust backup and restore strategy is essential for protecting your Prisme.ai platform data and ensuring business continuity. This guide provides detailed instructions for backing up and restoring all components of your self-hosted Prisme.ai environment.

Backup Strategy

Your Prisme.ai platform requires backing up several components:

Client-Managed Databases

  • MongoDB/compatible database
  • Elasticsearch/OpenSearch
  • Redis

Object Storage

  • S3 or compatible object storage
  • Document files and attachments

Configuration

  • Kubernetes manifests
  • Helm values
  • Terraform state files

Secrets

  • Kubernetes secrets
  • Certificate files
  • API keys and credentials

Database Backup Procedures

1

Create MongoDB Backup

Use mongodump to create a full backup of your MongoDB database:
Additional options to consider:
2

Verify MongoDB Backup

Ensure the backup contains all expected data:
3

Schedule Regular Backups

Create a cron job to automate daily backups:
Example backup script (mongodb-backup-script.sh):

Configuration Backup

1

Back Up Kubernetes Resources

Save your Kubernetes configuration resources:
2

Back Up Helm Values

Save your Helm chart values for each release:
3

Back Up Terraform State

If using Terraform, back up your state files:
Using remote state in Terraform (like S3 with versioning or Terraform Cloud) provides built-in backup capabilities.

Restore Procedures

1

Prepare for Restore

Before restoring, stop services that interact with the database:
2

Restore MongoDB Data

Use mongorestore to restore from your backup:
Restoring will overwrite existing data. Be sure to validate your backup before proceeding.
3

Restart Services

After restore is complete, scale the services back up:

Configuration Restore

1

Restore Kubernetes Resources

Apply your backed-up Kubernetes configurations:
Be cautious when restoring resources. Consider restoring specific resource types instead of everything at once:
2

Restore Helm Releases

Use your backed-up values to reinstall or upgrade Helm releases:
3

Restore Terraform State

If you need to restore Terraform state:
For remote state, follow your backend provider’s restoration process.

Disaster Recovery Planning

Define your recovery objectives to guide your backup strategy:

RPO (Recovery Point Objective)

Maximum acceptable data loss in time:
  • Critical data: RPO < 1 hour
  • Important data: RPO < 24 hours
  • Regular data: RPO < 1 week

RTO (Recovery Time Objective)

Maximum acceptable time to restore service:
  • Critical services: RTO < 4 hours
  • Important services: RTO < 24 hours
  • Regular services: RTO < 3 days

Testing and Validation

1

Verify Backup Integrity

Regularly test your backups to ensure they can be restored:
2

Validation Checkpoints

Establish validation points for successful restoration:

Data Validation

  • Record counts match pre-backup state
  • Sample record content is intact
  • Relationships between data are preserved
  • Application-specific data tests pass

Functionality Validation

  • Core services start successfully
  • API endpoints respond correctly
  • Authentication and authorization work
  • Data processing functions operate properly
  • UI elements display and function as expected
3

Document Restoration Procedures

Maintain detailed, tested restoration runbooks:
  • Step-by-step instructions
  • Required credentials and access
  • Validation checkpoints
  • Troubleshooting guidance
  • Contact information for support

Next Steps

Updates

Keep your platform current with the latest updates

Scaling

Scale your platform to meet growing demands