Skip to contentWhy?
- To develop effectively, you need to be able to work in an environment that is similar to production
- However, you don’t want to actually affect production, and might need permissions that you wouldn’t normally have in production
- To get around this, you can clone the database to your own computer, allowing you to use it in whatever way is necessary for your task
AWS Settings
- The AWS RDS server is as locked down as possible; to access it from outside AWS’s own network, your IP will need to be specifically added as approved
- First, find your public IP and send this to the Head of Tech
- Head of Tech: Nagivate to AWS Console -> EC2 -> Security Groups-> sg-04c3d16f7f5ecdc23 -> Inbound rules
- The IP needs to be added as PostgreSQL (port 5432), TCP protocol, and add the person’s name as the description
pgAdmin
- pgAdmin is the easiest way to visualise the cloning process, and I haven’t been able to find a simpler solution
- Add both your local database (should be there automatically) and the remote database (ask the Head of Tech for credentials)
- On the remote database:
- Connect to the server, navigate to Databases -> resn-nest
- Right-click resn-nest and click “Backup…” (save it somewhere convenient)
- Wait for this task to finish
- On the local database:
- Connect to the server, navigate to Databases
- If you are replacing an old local clone, first TRIPLE CHECK you are accessing the local server, then right-click and click “Delete/Drop”
- Right-click Databases, and create a new database called “resn-nest”
- Once created, right-click resn-nest and click “Restore…”