From 4fc7dcb507ffff3ec8bea8cc008e911e46f2a969 Mon Sep 17 00:00:00 2001 From: Adam Brokes Date: Wed, 13 Nov 2019 15:16:27 +1100 Subject: [PATCH] test restore - using the tar hack --- roles/restore_backups/tasks/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/restore_backups/tasks/main.yml b/roles/restore_backups/tasks/main.yml index 6b28bb1..5171c2b 100644 --- a/roles/restore_backups/tasks/main.yml +++ b/roles/restore_backups/tasks/main.yml @@ -68,7 +68,8 @@ overwrite: different bucket: "{{ atl_backup_manifest.artifacts.db.location.location | urlsplit('hostname') }}" object: "{{ atl_backup_manifest.artifacts.db.location.location | urlsplit('path') }}" - dest: "{{ atl_backup_db_dest }}" + # We write it as tar because that will force the postgresql_db module to use pg_dump rather than psql + dest: "{{ atl_backup_db_dest }}.tar" - name: Fetch Home backup from S3 aws_s3: @@ -96,7 +97,8 @@ template: "{{ atl_jdbc_template }}" # Depends on fetch_backup roles state: restore - target: "{{ atl_backup_db_dest }}" + target: "{{ atl_backup_db_dest }}.tar" + target_opts: "-Fc" register: result failed_when: - result.rc != 0