sauve les bdd avec mariadb11.4
This commit is contained in:
parent
7e8b950d85
commit
aa362a9cea
@ -111,10 +111,13 @@ saveDB () {
|
||||
userPass=$3
|
||||
dbName=$4
|
||||
backName=$5
|
||||
#on utilise mysqldump (v=10.5) et mariadb-dump (v>=11.4) pour être certain d'avoir un dump. L'une des 2 lignes fera une erreur
|
||||
if [[ -n "${SIMU}" ]] ; then
|
||||
${SIMU} "docker exec ${containerName} mysqldump --user=${userName} --password=${userPass} ${dbName} | gzip > $PATH_SAUVE${backName}.sql.gz"
|
||||
${SIMU} "docker exec ${containerName} mariadb-dump --user=${userName} --password=${userPass} ${dbName} | gzip > $PATH_SAUVE${backName}.sql.gz"
|
||||
else
|
||||
docker exec ${containerName} mysqldump --user=${userName} --password=${userPass} ${dbName} | gzip > $PATH_SAUVE${backName}.sql.gz
|
||||
docker exec ${containerName} mariadb-dump --user=${userName} --password=${userPass} ${dbName} | gzip > $PATH_SAUVE${backName}.sql.gz
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user