Backup & Recovery Policies
Procedures for database backups, Fernet key management, and disaster recovery.
1. Database Backup Policy
PostgreSQL Production Backup
Execute automated daily database dumps using :
pg_dumpbash
pg_dump -h localhost -U metapilot -F c -b -v -f "/backups/metapilot_$(date +%Y%m%d_%H%M%S).dump" metapilot
Retention Schedule
- Daily Dumps: Retained for 30 days.
- Weekly Dumps: Retained for 12 months.
2. Fernet Key Backup
[!CAUTION] Ifis lost, encrypted tenant access tokens inFERNET_KEYcannot be recovered.tenants_tenantconfig
- Backup Standard: must be stored securely in an encrypted secret store (HashiCorp Vault, AWS Secrets Manager, 1Password Teams).
FERNET_KEY - Never commit files to git repositories.
.env