DCD-686: Add download of the backups.

This commit is contained in:
Steve Smith
2019-10-04 15:42:44 +10:00
parent 87ac31ea3a
commit d67f579f2f

View File

@@ -44,4 +44,26 @@
file: "{{ atl_backup_manifest_dest }}"
name: atl_backup_manifest
- name: Define the DB and home dump destinations
set_fact:
atl_backup_db_dest: "{{ atl_installer_temp }}/{{ atl_backup_manifest.db_dump | basename }}"
atl_backup_home_dest: "{{ atl_installer_temp }}/{{ atl_backup_manifest.shared_home_dump | basename }}"
# FIXME: Here we fetch the backups. However we may wish to stream
# these directly from S3 to the target DB/FS to avoid requiring
# disk-space for the intermediate files.
- name: Fetch DB backup from S3
aws_s3:
mode: get
bucket: "{{ atl_backup_manifest.db_dump | urlsplit('hostname') }}"
object: "{{ atl_backup_manifest.db_dump | urlsplit('path') }}"
dest: "{{ atl_backup_db_dest }}"
- name: Fetch Home backup from S3
aws_s3:
mode: get
bucket: "{{ atl_backup_manifest.shared_home_dump | urlsplit('hostname') }}"
object: "{{ atl_backup_manifest.shared_home_dump | urlsplit('path') }}"
dest: "{{ atl_backup_home_dest }}"
when: atl_backup_manifest_url is defined and atl_backup_manifest_url != ''