restore backup task

This commit is contained in:
Pim Kunis 2023-01-21 00:09:26 +01:00
parent f142b0cf16
commit 1ff7fd5414
2 changed files with 4 additions and 4 deletions

View file

@ -32,3 +32,7 @@
enabled: true enabled: true
state: started state: started
daemon_reload: "{{ 'yes' if service.changed or timer.changed else 'no' }}" daemon_reload: "{{ 'yes' if service.changed or timer.changed else 'no' }}"
- name: Restore backup
command:
cmd: "borgmatic extract --archive latest --destination / --config {{ service_dir }}/backup.yml"
creates: /data

View file

@ -5,10 +5,6 @@
state: latest state: latest
update_cache: yes update_cache: yes
cache_valid_time: 86400 # One day cache_valid_time: 86400 # One day
- name: Create base data directory
file:
path: "{{ base_data_dir }}"
state: directory
- name: Create base service directory - name: Create base service directory
file: file:
path: "{{ base_service_dir }}" path: "{{ base_service_dir }}"