Skip to content

Commit

Permalink
Simple utilities to dump and load database
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Cross committed Oct 2, 2015
1 parent 0017816 commit d4e2b56
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions util/build_db
@@ -0,0 +1,9 @@
#!/bin/bash

# Make sure we're in the expected place
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
cd $SCRIPTPATH
cd ..

mysql -u$LIT_USER -p$LIT_PASS -Dliterature < db/literature.sql
mysql -u$LIT_USER -p$LIT_PASS -Dliterature < db/literature.dat
9 changes: 9 additions & 0 deletions util/dump_db
@@ -0,0 +1,9 @@
#!/bin/bash

# Make sure we're in the expected place
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
cd $SCRIPTPATH
cd ..

mysqldump -u$LIT_USER --no-data -p$LIT_PASS literature > db/literature.sql
mysqldump -u$LIT_USER --no-create-info -p$LIT_PASS literature > db/literature.dat

0 comments on commit d4e2b56

Please sign in to comment.