Backup container volumes on minisforum.

This commit is contained in:
2025-04-24 11:10:53 +02:00
parent 1773d42761
commit ef360755f4

View File

@@ -53,9 +53,7 @@
label: "{{ item[1].name }}"
- name: Create backup of volume and store to backup directory
shell: |
docker stop {{ item[0].name }}
docker start {{ item[0].name }}
shell: tar cfz {{ backup_location }}{{ item[0].name }}/{{ item[1] }}.tar.gz -C /var/lib/docker/volumes/{{ item[1] }}/_data
#ansible.builtin.debug:
# msg:
# - '{{ item[1] }}' # Volume name