Skip to content

Instantly share code, notes, and snippets.

@happysundar
Created May 15, 2014 03:31
Show Gist options
  • Save happysundar/0ee1e6d7280fbfaa6081 to your computer and use it in GitHub Desktop.
Save happysundar/0ee1e6d7280fbfaa6081 to your computer and use it in GitHub Desktop.
Commands to backup and restore postgres database
/usr/pgsql-9.3/bin/pg_dump -U <user_name> -d <db_name> -f <backup_file>.sql -h <db_host>
/usr/pgsql-9.3/bin/psql -U <user_name> -d <db_name> -f <backup_file>.sql -h <db_host>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment