Skip to content
Snippets Groups Projects
Commit 05ca3fc5 authored by jurgenhaas's avatar jurgenhaas
Browse files

Fix init of new borg repos

parent 93809ac0
No related branches found
No related tags found
No related merge requests found
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
# file: roles/borgbackup/handlers/main.yml # file: roles/borgbackup/handlers/main.yml
- name: Init Borgs - name: Init Borgs
command: echo "borgmatic init --encryption repokey" command: borgmatic init --encryption repokey
--- ---
# file: roles/borgbackup/tasks/config.yml # file: roles/borgbackup/tasks/config.yml
- name: Ensure local backup directory
file:
dest: /var/backups/borg/default
owner: root
group: root
state: directory
mode: 0700
when: not borgbackup.disable_local|default(false)
- name: Add Borgmatic Configuration - name: Add Borgmatic Configuration
template: template:
src: config.yaml src: config.yaml
......
...@@ -26,6 +26,15 @@ ...@@ -26,6 +26,15 @@
application_mountpoints: '{{ drupal.mountpoints }}' application_mountpoints: '{{ drupal.mountpoints }}'
when: drupal.mountpoints is defined when: drupal.mountpoints is defined
- name: Ensure local backup directory
file:
dest: /var/backups/borg/{{ application }}_{{ application_id }}
owner: root
group: root
state: directory
mode: 0700
when: not application_disable_local
- name: Configure Drupal Backup - name: Configure Drupal Backup
template: template:
src: application.yaml src: application.yaml
......
...@@ -17,6 +17,15 @@ ...@@ -17,6 +17,15 @@
application_dir: '{{ jailroot }}/{{ nextcloud.id }}/var/www/datanextcloud' application_dir: '{{ jailroot }}/{{ nextcloud.id }}/var/www/datanextcloud'
when: nextcloud.jail is defined when: nextcloud.jail is defined
- name: Ensure local backup directory
file:
dest: /var/backups/borg/{{ application }}_{{ application_id }}
owner: root
group: root
state: directory
mode: 0700
when: not application_disable_local
- name: Configure NextCloud Backup - name: Configure NextCloud Backup
template: template:
src: application.yaml src: application.yaml
......
...@@ -10,6 +10,15 @@ ...@@ -10,6 +10,15 @@
application_disable_local: '{{ borgmaticother.disable_local|default(false) }}' application_disable_local: '{{ borgmaticother.disable_local|default(false) }}'
application_dir: '{{ borgmaticother.data_dir }}' application_dir: '{{ borgmaticother.data_dir }}'
- name: Ensure local backup directory
file:
dest: /var/backups/borg/{{ application }}_{{ application_id }}
owner: root
group: root
state: directory
mode: 0700
when: not application_disable_local
- name: Configure Other Backup - name: Configure Other Backup
template: template:
src: application.yaml src: application.yaml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment