Skip to content

Instantly share code, notes, and snippets.

@furkanayhan
Created July 3, 2014 12:29
Show Gist options
  • Save furkanayhan/2a1d8ac5994992a0f925 to your computer and use it in GitHub Desktop.
Save furkanayhan/2a1d8ac5994992a0f925 to your computer and use it in GitHub Desktop.
Postgresql backup and restore (pg_dump - pg_restore)
pg_dump -h localhost -U USERNAME -f backup.dump DATABASENAME -Fc
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U USERNAME -d DATABASENAME backup.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment