Generate Production Dump
Create with pg_dump
-
If there is an existing stopped instance, start it and use it, otherwise follow the ec2 creation steps
- Create EC2 with ubuntu 22.04 and 30GB EBS with a new key pair.
- Ensure correct saut vpc and ingressSubnet is chosen
- Enable public ip
- Select
saut-prod-ec2-rds-accesssecurity group - ssh to instance
- Run this script
sudo apt updatesudo apt install wget
echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' -
Take the pg_dump
get password from secrets manager in aws
-
After copy is done on ec2 - use scp to copy to local