Skip to content

Instantly share code, notes, and snippets.

@oxidizeddreams
Created March 9, 2019 02:02
Show Gist options
  • Save oxidizeddreams/ae59095b72f17db74d06fb331aabe7de to your computer and use it in GitHub Desktop.
Save oxidizeddreams/ae59095b72f17db74d06fb331aabe7de to your computer and use it in GitHub Desktop.
dump and restore schema and data
PGPASSWORD="" pg_dump --no-owner --no-privileges -h rds-01.us-east-1.rds.amazonaws.com -U root -d oldDB --schema public \
| PGPASSWORD="" psql -x -q -U admin -h rds-01.cluster.us-east-1.rds.amazonaws.com newDB;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment