Skip to content

Instantly share code, notes, and snippets.

@powellc
Created February 14, 2013 17:44
Show Gist options
  • Select an option

  • Save powellc/4954592 to your computer and use it in GitHub Desktop.

Select an option

Save powellc/4954592 to your computer and use it in GitHub Desktop.
A simple shell script to drop a staging database and clone the production database in it's place
sudo -u postgres dropdb <staging_db>
sudo -u postgres createdb -O <staging_user> -T <production_db> <staging_db>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment