Skip to content

Instantly share code, notes, and snippets.

@Ksisu
Created June 9, 2020 07:27
Show Gist options
  • Save Ksisu/ee7b8464a9c22ca6af8fc835b1ed663f to your computer and use it in GitHub Desktop.
Save Ksisu/ee7b8464a9c22ca6af8fc835b1ed663f to your computer and use it in GitHub Desktop.
PSQL copy database
# Copy remote database to local
pg_dump -C -h <<REMOTE_IP>> -U <<REMOTE_USER>> <<REMOTE_DB>> | psql -U <<LOCAL_USER>> <<LOCAL_DB>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment