Skip to content

Instantly share code, notes, and snippets.

@rbuels
Created October 30, 2009 20:15
Show Gist options
  • Select an option

  • Save rbuels/222677 to your computer and use it in GitHub Desktop.

Select an option

Save rbuels/222677 to your computer and use it in GitHub Desktop.
#!/bin/sh
PSQL="sudo -u postgres psql cxgn"
set -e
sudo echo;
#ssh db.sgn.cornell.edu pg_dump --clean --schema-only --schema genomic --host localhost --user postgres cxgn | $PSQL
sudo echo;
clone_list="clone_type sequencing_primer library library_shortname_abbreviation clone"
for table in $clone_list; do
ssh -C db.sgn.cornell.edu pg_dump --data-only --inserts --schema genomic --table $table --host localhost --user postgres cxgn | $PSQL
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment