Begin remove backup from docker + Debian support
This commit is contained in:
parent
e026113bb7
commit
7fe8837098
31 changed files with 82 additions and 565 deletions
|
@ -2,7 +2,3 @@
|
|||
|
||||
- ansible.builtin.import_tasks: base.yml
|
||||
name: base
|
||||
|
||||
- ansible.builtin.import_tasks: restore.yml
|
||||
name: restore
|
||||
when: restore.matrix.db_archive and restore.matrix.matrix_archive and restore.matrix.mautrix_facebook_archive and restore.matrix.mautrix_instagram_archive and restore.matrix.mautrix_discord_archive
|
|
@ -1,52 +0,0 @@
|
|||
---
|
||||
|
||||
- name: Copy archives
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
loop:
|
||||
- { src: '{{ restore.matrix.db_archive }}', dest: 'matrix_db.tar.gz' }
|
||||
- { src: '{{ restore.matrix.matrix_archive }}', dest: 'matrix_matrix.tar.gz' }
|
||||
- { src: '{{ restore.matrix.mautrix_facebook_archive }}', dest: 'matrix_mautrix_facebook.tar.gz' }
|
||||
- { src: '{{ restore.matrix.mautrix_instagram_archive }}', dest: 'matrix_mautrix_instagram.tar.gz' }
|
||||
- { src: '{{ restore.matrix.mautrix_discord_archive }}', dest: 'matrix_mautrix_discord.tar.gz' }
|
||||
|
||||
- name: Stop nextcloud container
|
||||
community.docker.docker_compose:
|
||||
project_src: matrix
|
||||
state: absent
|
||||
become: true
|
||||
|
||||
- name: Restore backup
|
||||
community.docker.docker_container:
|
||||
name: volume_restore
|
||||
image: volume_restore:latest
|
||||
auto_remove: yes
|
||||
tty: true
|
||||
volumes:
|
||||
- "{{ item.path }}:/backup/archive.tar.gz"
|
||||
- "{{ item.volume }}:/backup/dest"
|
||||
loop:
|
||||
- { path: './matrix_db.tar.gz', volume: 'matrix_db' }
|
||||
- { path: './matrix_matrix.tar.gz', volume: 'matrix_matrix' }
|
||||
- { path: './matrix_mautrix_facebook.tar.gz', volume: 'matrix_mautrix_facebook' }
|
||||
- { path: './matrix_mautrix_instagram.tar.gz', volume: 'matrix_mautrix_instagram' }
|
||||
- { path: './matrix_mautrix_discord.tar.gz', volume: 'matrix_mautrix_discord' }
|
||||
become: true
|
||||
|
||||
- name: Start nextcloud container
|
||||
community.docker.docker_compose:
|
||||
project_src: matrix
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Remove archive
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
loop:
|
||||
- { path: 'matrix_db.tar.gz' }
|
||||
- { path: 'matrix_matrix.tar.gz' }
|
||||
- { path: 'matrix_mautrix_facebook.tar.gz' }
|
||||
- { path: 'matrix_mautrix_instagram.tar.gz' }
|
||||
- { path: 'matrix_mautrix_discord.tar.gz' }
|
Loading…
Add table
Add a link
Reference in a new issue