Skip to content

Commit

Permalink
apogeedb dump
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Brownstein committed Dec 22, 2020
1 parent 0231dac commit d9d4c1b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bin/apogeedb_dump
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ NOW=$(date +"%m%d%Y")
db=sdss5db
for schema in apogee_drp astra; do
PG_DUMP_FILE=${SDSS5DB_DUMP_DIR}/${schema}/${db}_${schema}_$NOW.sql
if [ -f $PG_DUMP_FILE ]; then
echo "ABORTING: $PG_DUMP_FILE exists."
else
pg_dump -U sdss -d $db -n $schema -v -Fc > $PG_DUMP_FILE
fi
if [ -f $PG_DUMP_FILE ]; then
echo "ABORTING: $PG_DUMP_FILE exists."
else
pg_dump -U sdss -d $db -n $schema -v -Fc > $PG_DUMP_FILE
fi
done

0 comments on commit d9d4c1b

Please sign in to comment.