/
/
/
Ansible role that can run restic backups and push it to a remote storage server.
1---
2# Restore /docker services from their latest snapshot on THIS host.
3#
4# ansible-playbook backup.yml -e backup_mode=restore -e backup_services=mealie --limit runner
5#
6# The service directory is replaced by the snapshot's content. Excluded paths
7# (models, caches) are not in the snapshot and are re-created by the service.
8# Containers that were running are stopped first and started again after.
9# Data paths and appliances are restored by hand (see the role README).
10
11- name: Require an explicit service selection
12 ansible.builtin.assert:
13 that: _backup_selection | length > 0
14 fail_msg: "Restore needs backup_services, e.g. -e backup_services=mealie"
15
16- name: Restore each selected service
17 ansible.builtin.include_tasks: restore-service.yml
18 loop: "{{ _backup_selection }}"
19 loop_control:
20 loop_var: svc
21