Skip to content

Instantly share code, notes, and snippets.

@orthecreedence
Created February 3, 2015 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orthecreedence/ea8705f392fa900da6ba to your computer and use it in GitHub Desktop.
Save orthecreedence/ea8705f392fa900da6ba to your computer and use it in GitHub Desktop.
Postgres import
#!/bin/bash
FILE=$1
if [ "$FILE" == ""]; then
echo "Usage: $0 /path/to/dump.sql"
exit 1
fi
/usr/local/postgres/bin/psql \
-h 127.0.0.1 \
-p 5432 \
-U postgres \
-d periscope \
-f ${FILE} \
-v ON_ERROR_STOP=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment