1. Dump remote db which is only accessible through proxy step 1: create ssh tunnel to proxy ssh -L localhost:5433:database-host:5432 ubuntu@proxy-server-ip -i your-private-key.cer step 2: dump using pg_dump pg_dump -f ./dump.sql -d postgres_user -h localhost -p 5433