Encrypt PostgreSQL Backup to S3
Encrypt Your DB Backups I’m mostly putting this here for my reference. I do this in multiple projects and always seem to forget where my instructions are.
Generate Keys From your user’s home directory:
openssl req -x509 -nodes -days 1000000 -newkey rsa:4096 -keyout .ssh/backup_key.pem -out .ssh/backup_key.pem.pub
Fill out the questions appropriately. Or not. I don’t think it matters really.
That will create the public and private keys.
backup_key.pem - private key backup_key.