summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/MythVantage-system/restore_job.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-10-23 18:17:40 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-10-23 18:19:39 (GMT)
commitadbcf19958300e9b6598990184c8815b945ba0ee (patch)
treef4283c850ac0ac202c17e78a637ee7ca8147621b /abs/mv-core/MythVantage-system/restore_job.sh
parent61a68250df10d29b624650948484898334ff22d0 (diff)
downloadlinhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.zip
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.gz
linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.bz2
Removed old core and extra from repo. Renamed -testing to core/extra. This will setup the base for the testing branch.
Diffstat (limited to 'abs/mv-core/MythVantage-system/restore_job.sh')
-rwxr-xr-xabs/mv-core/MythVantage-system/restore_job.sh39
1 files changed, 0 insertions, 39 deletions
diff --git a/abs/mv-core/MythVantage-system/restore_job.sh b/abs/mv-core/MythVantage-system/restore_job.sh
deleted file mode 100755
index 0d0bec7..0000000
--- a/abs/mv-core/MythVantage-system/restore_job.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-backupfile=$1
-. /etc/profile
-BACKUPDIR=/data/database_backup
-RESTOREDIR=$BACKUPDIR/restore
-DIR=`echo $backupfile |cut -d. -f2`
-CSQL="create database mythconverg;"
-DSQL="drop database mythconverg; "
-MYSQL="mysql -u mythtv -pmythtv"
-
-
-
-mkdir $RESTOREDIR
-cp $BACKUPDIR/$backupfile $RESTOREDIR
-cd $RESTOREDIR && tar -xvf $backupfile && cd $DIR
-
-if [ -f mythconverg ]
-then
- #drop the db
- $MYSQL -e "$DSQL"
- #create the db
- $MYSQL -e "$CSQL"
- #restore the database_backup
- echo "Restoring the database $DIR"
- $MYSQL mythconverg < mythconverg
- if [ $? = 0 ]
- then
- echo "Done"
- else
- echo "An error occured"
- fi
- else
- echo "couldn't file a file to restore"
-fi
-
-
-#cleanup
-rm -rf $RESTOREDIR/$DIR
-rm -f $RESTOREDIR/$backupfile \ No newline at end of file