Update DB Scripts

Added backup / restore scripts.
Added table size script
Updated existing scripts to use variable location for mysql.cnf file
This commit is contained in:
woogerboy21 2015-07-11 11:22:54 -04:00
parent f733daf18a
commit 04c09647d7
8 changed files with 105 additions and 4 deletions

View file

@ -1,3 +1,4 @@
#!/bin/bash
# SCHEDULE WITH CRONTAB BASED ON TIME PERIOD REPLAYS SHOULD BE SAVED UNTIL (EX: SCHEDULE ONCE A WEEK TO KEEP A WEEKS WORTH OF REPLAYS IN THE DB)
mysql --defaults-file=./mysql.cnf -h localhost -e 'truncate table servatrice.cockatrice_replays;truncate table servatrice.cockatrice_replays_access'
SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file
mysql --defaults-file=$SQLCONFFILE -h localhost -e 'truncate table servatrice.cockatrice_replays;truncate table servatrice.cockatrice_replays_access'