/[pdpsoft]/trunk/eu.rcauth.pilot-ica/DS/ansible/roles/delegserver/files/mysql-restore.sh
ViewVC logotype

Annotation of /trunk/eu.rcauth.pilot-ica/DS/ansible/roles/delegserver/files/mysql-restore.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3077 - (hide annotations) (download) (as text)
Mon Aug 8 13:37:02 2016 UTC (5 years, 9 months ago) by msalle
File MIME type: application/x-shellscript
File size: 537 byte(s)
Add mysql dump and restore scripts plus cronjob for the former.
Move 00-httpoxy from templates to file (it's not a template)
Update the oauth2 war and jar files.

1 msalle 3077 #! /bin/sh
2    
3     MYSQL_USER=root
4     MYSQL_PASSWORD=
5    
6     echo -ne "password for user $MYSQL_USER: "
7     stty -echo
8     read MYSQL_PASSWORD
9     stty echo
10    
11    
12     function restore() {
13     echo "Restoring $1 (assume compressed)";
14     (
15     echo "SET AUTOCOMMIT=0;"
16     echo "SET UNIQUE_CHECKS=0;"
17     echo "SET FOREIGN_KEY_CHECKS=0;"
18     gunzip -dc "$1"
19     echo "SET FOREIGN_KEY_CHECKS=1;"
20     echo "SET UNIQUE_CHECKS=1;"
21     echo "SET AUTOCOMMIT=1;"
22     echo "COMMIT;"
23     ) | mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD"
24     }
25    
26     restore "$1"
27    

Properties

Name Value
svn:executable *

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28