@ -9,7 +9,7 @@ name="$2";
# Variables
dir="$(dirname "$path")";
base="$(basename "$path")";
dest={{ backups_files_directory | quote }}"/$name.tar.gpg";
dest={{ backups_files_directory | quote }}"/$name/latest.tar.gpg";
# Execution
tar --directory="$dir" --create --file=- "$base" |
@ -1,5 +1,13 @@
---
- name: Create directory for backups for files of {{ domain }}
file:
state: directory
path: "{{ backups_files_directory }}/{{ domain }}"
owner: root
group: root
mode: "u=rwx,g=rx,o=rx"
- name: Install auto backup script for files of {{ domain }}
template:
src: "backup.sh"