KMS & Stack Tuning
Encrypted pg_dump & Offsite Snapshot Verification Pipeline
Automate non-blocking database backups and verify restore drills without exposing ENCRYPTION_KEY alongside database dumps.
Zstd pg_dump · Separated Key Storage · Weekly Restore Test
Why Co-Located Keys Defeat Backups
Even though Infisical stores secrets encrypted in PostgreSQL, keeping .env alongside pg_dump files in the same bucket exposes plaintext recovery if object credentials leak.
Fast Custom-Format Dumps
Use pg_dump -Fc -Z 6 to keep backup duration under 20 seconds on 15 GB databases without locking concurrent secret reads.
Measured Thresholds & KMS Configuration
| Artifact | Storage Location | Encryption Rule |
|---|---|---|
| PostgreSQL Dump | Offsite S3 / Object Bucket | Age / GPG encrypted pre-upload |
| ENCRYPTION_KEY | Offline Hardware / Separate Vault | Never co-located with DB backup |
| Restore Verification | Ephemeral Staging Container | Monthly automated checksum test |