From 0990e8895a44bdb4fec4b9d5e974e87202eafd11 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 22 Oct 2023 12:06:30 +0200 Subject: [PATCH] Finish DB backup. --- backup_ovh1.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/backup_ovh1.yml b/backup_ovh1.yml index 93174b3..ec88a1b 100755 --- a/backup_ovh1.yml +++ b/backup_ovh1.yml @@ -25,17 +25,10 @@ ansible.builtin.shell: "ls -tr /mnt/volumes/mysql-server_dumps/data/mysql_dump_*" register: DBs_dump - - debug: var=MySQL_dump - - debug: var=DBs_dump - - ansible.builtin.meta: end_play - - name: Archive DB dumps - ansible.builtin.command: "tar -czf {{ WORKDIR }}/backup/mysql-server_dumps.tar.gz -C /mnt/volumes ${name_mysql_dump} ${name_dbs_dump}" + ansible.builtin.command: "tar -czf {{ WORKDIR }}/backup/mysql-server_dumps.tar.gz -C /mnt/volumes {{ MySQL_dump.stdout_lines | last }} {{ DBs_dump.stdout_lines | last }}" with_items: "{{ BACKUP_OVH1_VOLUMES }}" -#name_mysql_dump=$(ls -tr ${name}/data/mysql_dump-mysql_*|tail -n1) -#name_dbs_dump=$(ls -tr ${name}/data/mysql_dump_*|tail -n1) - # python3-swiftclient is a requirement of duplicity - name: Install python3-swiftclient ansible.builtin.package: