Restore volumes directly with duplicity.
This commit is contained in:
parent
4c91837329
commit
1bddbe179e
@ -46,7 +46,7 @@
|
||||
|
||||
- name: restore volume backup
|
||||
ansible.builtin.command:
|
||||
cmd: "duplicity restore --file-to-restore {{ item }}.tar.gz --do-not-restore-ownership --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} swift://backup_ovh1 {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz"
|
||||
cmd: "duplicity restore --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} --name {{ item }} swift://backup_ovh1 /mnt/volumes/{{ item }}"
|
||||
environment:
|
||||
SWIFT_USERNAME: "{{ OS_USERNAME }}"
|
||||
SWIFT_PASSWORD: "{{ OS_PASSWORD }}"
|
||||
@ -67,16 +67,6 @@
|
||||
changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0
|
||||
when: not reverse_proxy_installed_flag.stat.exists
|
||||
|
||||
- name: Unarchive volume backup
|
||||
ansible.builtin.command:
|
||||
cmd: "tar -xzvf {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz -C /mnt/volumes/{{ item }}/data --strip 2"
|
||||
become: true
|
||||
with_items:
|
||||
- reverse-proxy_conf
|
||||
- reverse-proxy_conf_enabled
|
||||
- reverse-proxy_letsencrypt
|
||||
when: not reverse_proxy_installed_flag.stat.exists
|
||||
|
||||
# A local volume is needed to store install states
|
||||
- name: Create /mnt/volumes/install_states directory if it does not exist
|
||||
ansible.builtin.file:
|
||||
|
Loading…
Reference in New Issue
Block a user