From 95faea43af33663e91ae0df4a8a24ed1c3217bf8 Mon Sep 17 00:00:00 2001 From: xdfil Date: Thu, 14 Sep 2017 22:24:37 -0700 Subject: [PATCH] Add option to disable xtrabackup compression Modified cluster.cnf template so that the "compress" option in the "xtrabackup" section is controlled by a variable, "galera_xtrabackup_compression". The default value of the variable is "true" which respects the previous behavior. Change-Id: I76e07c669be798f538183a5f8a3ff886db2d7dd2 --- defaults/main.yml | 2 ++ templates/cluster.cnf.j2 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 4e8493cb..4c082a2d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -106,6 +106,8 @@ galera_wsrep_provider_options: galera_wsrep_sst_auth_user: "root" galera_wsrep_sst_auth_password: "{{ galera_root_password }}" +# Enable compression of backups +galera_xtrabackup_compression: true # xtrabackup parallel/compression/sync threads galera_xtrabackup_threads: 4 diff --git a/templates/cluster.cnf.j2 b/templates/cluster.cnf.j2 index 57eee347..99f8cc54 100644 --- a/templates/cluster.cnf.j2 +++ b/templates/cluster.cnf.j2 @@ -47,7 +47,9 @@ wsrep_cluster_name = "{{ galera_cluster_name }}" wsrep_retry_autocommit = {{ galera_wsrep_retry_autocommit }} [xtrabackup] +{% if galera_xtrabackup_compression | bool %} compress +{% endif %} parallel = {{ galera_xtrabackup_threads }} compress-threads = {{ galera_xtrabackup_threads }} rebuild-threads = {{ galera_xtrabackup_threads }}