Skip to content

Instantly share code, notes, and snippets.

@ZackMattor
Forked from haywoood/gist:4540930
Last active December 20, 2015 13:39
Show Gist options
  • Save ZackMattor/6140238 to your computer and use it in GitHub Desktop.
Save ZackMattor/6140238 to your computer and use it in GitHub Desktop.
Make Backup
=====
pg_dump -c #{database} > ~/Desktop/#{database}.dump
pg_dump -Fc --no-acl --no-owner -h localhost -U dev mreach-vmware-api_development > ~/Desktop/mydb.dump
Restore backup
====
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U dev -d mreach-vmware-api_development mydb.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment