Subversion Repositories ALCASAR

Rev

Rev 386 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 386 Rev 417
Line 1... Line 1...
1
#! /bin/bash
1
#! /bin/bash
2
# $Id: alcasar-mysql.sh 386 2010-12-29 22:04:40Z franck $
2
# $Id: alcasar-mysql.sh 417 2011-01-05 19:56:14Z franck $
3
 
3
 
4
## Script de sauvegarde de la base MySQL 'radius' (by rexy)
4
## Script de sauvegarde de la base MySQL 'radius' (by rexy)
5
 
5
 
6
LANG="fr_FR@euro"  			# choix de la langue
6
LANG="fr_FR@euro"  			# choix de la langue
7
rep_tr="/var/Save/base" 	 	# répertoire d'accueil des sauvegardes
7
rep_tr="/var/Save/base" 	 	# répertoire d'accueil des sauvegardes
Line 43... Line 43...
43
			 mysql -u $DB_USER -p$radiuspwd < $2
43
			 mysql -u $DB_USER -p$radiuspwd < $2
44
			
44
			
45
		fi
45
		fi
46
		;;
46
		;;
47
	-raz | --raz)
47
	-raz | --raz)
-
 
48
		mysqldump -u $DB_USER -p$radiuspwd --opt -BcQC  $DB_RADIUS > $rep_tr/$fichier && \
48
		mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < /etc/raddb/radiusd-db-vierge.sql
49
		mysql -u$DB_USER -p$radiuspwd $DB_RADIUS < /etc/raddb/radiusd-db-vierge.sql
49
		;;
50
		;;
50
	*)
51
	*)
51
		echo "Argument inconnu :$1";
52
		echo "Argument inconnu :$1";
52
		echo "$usage"
53
		echo "$usage"