From f321d6053590dfe0da3108bd53c3616e831a159a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 26 May 2021 11:00:06 +0200 Subject: [PATCH] Update to 2021-05-26 11:00 --- roles/rabbitmq_server/templates/post-backup.j2 | 5 +++++ roles/rabbitmq_server/templates/pre-backup.j2 | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/roles/rabbitmq_server/templates/post-backup.j2 b/roles/rabbitmq_server/templates/post-backup.j2 index 898c2cb..17d307c 100644 --- a/roles/rabbitmq_server/templates/post-backup.j2 +++ b/roles/rabbitmq_server/templates/post-backup.j2 @@ -1,3 +1,8 @@ #!/bin/bash -e +{% if rabbitmq_conf == 'rabbitmq.conf' %} rm -f /home/lbkp/rabbitmq/definitions.json +{% else %} +# RabbitMQ version too old to support export_definitions +{% endif %} + diff --git a/roles/rabbitmq_server/templates/pre-backup.j2 b/roles/rabbitmq_server/templates/pre-backup.j2 index 1f800c0..b1d722f 100644 --- a/roles/rabbitmq_server/templates/pre-backup.j2 +++ b/roles/rabbitmq_server/templates/pre-backup.j2 @@ -1,5 +1,9 @@ #!/bin/bash -e +{% if rabbitmq_conf == 'rabbitmq.conf' %} mkdir -p /home/lbkp/rabbitmq/ /usr/sbin/rabbitmqctl export_definitions --format json definitions.json mv /var/lib/rabbitmq/definitions.json /home/lbkp/rabbitmq/ +{% else %} +# RabbitMQ version too old to support export_definitions +{% endif %}