Moved file backups into certain directories

dehydrated
Felix Stupp 5 years ago
parent c959db1d3f
commit 4be0e9377f
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -9,7 +9,7 @@ name="$2";
# Variables # Variables
dir="$(dirname "$path")"; dir="$(dirname "$path")";
base="$(basename "$path")"; base="$(basename "$path")";
dest={{ backups_files_directory | quote }}"/$name.tar.gpg"; dest={{ backups_files_directory | quote }}"/$name/latest.tar.gpg";
# Execution # Execution
tar --directory="$dir" --create --file=- "$base" | 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 }} - name: Install auto backup script for files of {{ domain }}
template: template:
src: "backup.sh" src: "backup.sh"

Loading…
Cancel
Save