Merge branch 'master' into dist/eole/2.6.2/master
This commit is contained in:
commit
b4cccc5e12
|
@ -30,6 +30,9 @@
|
||||||
<variable name="dbEnable" type='oui/non' description='Activer le serveur de base de données MariaDB'>
|
<variable name="dbEnable" type='oui/non' description='Activer le serveur de base de données MariaDB'>
|
||||||
<value>non</value>
|
<value>non</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
<variable name="dbEnableBackup" type='oui/non' description='Activer la sauvegarde sur le serveur de base de données MariaDB'>
|
||||||
|
<value>non</value>
|
||||||
|
</variable>
|
||||||
</family>
|
</family>
|
||||||
<family name="Database">
|
<family name="Database">
|
||||||
<variable name='dbEnableCluster' type='oui/non' description="Activer la mise en grappe MariaDB Galera ?">
|
<variable name='dbEnableCluster' type='oui/non' description="Activer la mise en grappe MariaDB Galera ?">
|
||||||
|
@ -64,6 +67,9 @@
|
||||||
<variable name='dbInnoDBLogFileSize' type='number' description="Taille des fichiers de transaction InnoDB">
|
<variable name='dbInnoDBLogFileSize' type='number' description="Taille des fichiers de transaction InnoDB">
|
||||||
<value>6</value>
|
<value>6</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
<variable name='dbInnoDBLockWaitTimeout' type='number' description="Nombre de millisecondes d'attente avant de fermer la connection en lock (innodb_lock_wait_timeout)">
|
||||||
|
<value>120</value>
|
||||||
|
</variable>
|
||||||
<variable name="dbMaxConnections" type="number" description="Nombre de connection maximum pour le serveur de bases de données (max_connections)">
|
<variable name="dbMaxConnections" type="number" description="Nombre de connection maximum pour le serveur de bases de données (max_connections)">
|
||||||
<value>100</value>
|
<value>100</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
creolefuncs_DATA_DIR := $(DESTDIR)/usr/share/creole/funcs
|
creolefuncs_DATA_DIR := $(DESTDIR)/usr/share/creole/funcs
|
||||||
|
schedule_extra_DATA_DIR := $(DESTDIR)/usr/share/eole/creole/extra/schedule/
|
||||||
|
schedule_config_DATA_DIR := $(DESTDIR)/usr/share/eole/schedule/
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Configuration commune aux scripts schedule
|
||||||
|
# Configuration de base modifiée pour copier dans le partage nfs plutôt que /home
|
||||||
|
|
||||||
|
SAVDIR=/mnt/sauvegardes/
|
||||||
|
# pour que l'affichage de [ ok ] soit ok
|
||||||
|
export TERM='dumb'
|
||||||
|
umask 0077
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<creole>
|
||||||
|
<variables>
|
||||||
|
<family name="mysql" description="Exportation des bases de données MySQL">
|
||||||
|
<variable name="description" type="string" hidden="True"><value>Exportation des bases MySQL</value></variable>
|
||||||
|
<variable name="day" type="schedule" description="Périodicité d'exécution"><value>daily</value></variable>
|
||||||
|
<variable name="mode" type="schedulemod" hidden="True"><value>pre</value></variable>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name='calc_multi_condition' target='schedule.mysql.day'>
|
||||||
|
<param>non</param>
|
||||||
|
<param type='eole' name='condition_1'>dbEnableBackup</param>
|
||||||
|
<param name='match'>none</param>
|
||||||
|
<param name='mismatch'>daily</param>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
</creole>
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DESC="Exportation des bases MySQL"
|
||||||
|
|
||||||
|
. /usr/share/eole/schedule/config.sh
|
||||||
|
|
||||||
|
MYSQLSAVDIR=$SAVDIR/sql
|
||||||
|
OPTION="--lock-tables"
|
||||||
|
|
||||||
|
rm -f $MYSQLSAVDIR/*.sql
|
||||||
|
mkdir -p $MYSQLSAVDIR
|
||||||
|
|
||||||
|
CMD="mysql --defaults-file=/etc/mysql/mariadb.cnf -e 'show databases' | grep -v '^Database$'"
|
||||||
|
DATABASES=$(CreoleRun "$CMD" mysql)
|
||||||
|
for databasename in $DATABASES; do
|
||||||
|
case "$databasename" in
|
||||||
|
information_schema|performance_schema|bareos)
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CMD="mysqldump --defaults-file=/etc/mysql/mariadb.cnf --databases $databasename --flush-privileges --create-options -Q -c $OPTION 2>/dev/null"
|
||||||
|
CreoleRun "$CMD" mysql > $MYSQLSAVDIR/$databasename.sql
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
|
@ -5,6 +5,7 @@ skip-name-resolve
|
||||||
innodb_buffer_pool_size=%%getMemoryPercentage(%%getVar('dbInnoDBBufferPoolPercentage', 10))
|
innodb_buffer_pool_size=%%getMemoryPercentage(%%getVar('dbInnoDBBufferPoolPercentage', 10))
|
||||||
innodb_log_buffer_size=%%{dbInnoDBLogBufferSize}M
|
innodb_log_buffer_size=%%{dbInnoDBLogBufferSize}M
|
||||||
innodb_log_file_size=%%{dbInnoDBLogFileSize}M
|
innodb_log_file_size=%%{dbInnoDBLogFileSize}M
|
||||||
|
innodb_lock_wait_timeout=%%{dbInnoDBLockWaitTimeout}
|
||||||
|
|
||||||
max_connections=%%dbMaxConnections
|
max_connections=%%dbMaxConnections
|
||||||
thread_cache_size=%%dbThreadCacheSize
|
thread_cache_size=%%dbThreadCacheSize
|
||||||
|
@ -14,6 +15,9 @@ query_cache_type = 1
|
||||||
query_cache_limit = %%getVar('dbQueryCacheLimit')
|
query_cache_limit = %%getVar('dbQueryCacheLimit')
|
||||||
query_cache_min_res_unit = %%getVar('dbQueryCacheMinRestUnit')
|
query_cache_min_res_unit = %%getVar('dbQueryCacheMinRestUnit')
|
||||||
query_cache_size = %%getVar('dbQueryCacheSize')
|
query_cache_size = %%getVar('dbQueryCacheSize')
|
||||||
|
%else
|
||||||
|
query_cache_type = 0
|
||||||
|
query_cache_size = 0
|
||||||
%end if
|
%end if
|
||||||
|
|
||||||
tmp_table_size = %%dbTmpTableSize
|
tmp_table_size = %%dbTmpTableSize
|
||||||
|
|
Loading…
Reference in New Issue