Extracted role misc/backup_files from server/{gitea,nextcloud}

dehydrated
Felix Stupp 5 years ago
parent 83e249e73c
commit 8303d0126e
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -0,0 +1,4 @@
---
# domain: backup.example
backup_directory: "{{ global_webservers_directory }}/{{ domain }}"

@ -0,0 +1,9 @@
---
- name: Configure auto backup files of {{ domain }}
cron:
hour: 1
minute: 0
job: "{{ global_helper_directory }}/backup_files.sh {{ backup_directory | quote }} {{ domain | quote }}"
name: "backup files of {{ domain }}"
state: present

@ -2,6 +2,9 @@
dependencies:
- role: misc/handlers
- role: misc/backup_files
# domain
backup_directory: "{{ gitea_repositories_directory }}"
- role: mysql/database
# database_user
- role: nginx/proxy

@ -83,14 +83,6 @@
- reload systemd
- restart gitea
- name: Configure auto backup of gitea repositories directory
cron:
hour: 1
minute: 0
job: "{{ global_helper_directory }}/backup_files.sh {{ gitea_repositories_directory | quote }} {{ domain | quote }}"
name: "backup gitea repositories of {{ domain }}"
state: present
- name: Enable auto update of gitea
cron:
hour: 2

@ -7,6 +7,9 @@ dependencies:
# system_user
user_directory: "{{ nextcloud_user_directory }}"
user_directory_group: "{{ nginx_system_user }}"
- role: misc/backup_files
# domain
backup_directory: "{{ nextcloud_data_directory }}"
- role: mysql/database
# database_user
- role: nginx/php-pool

@ -126,11 +126,3 @@
name: "nextcloud cron for {{ domain }}"
minute: "*/5"
job: "sudo -u {{ system_user }} php -f \"{{ nextcloud_installation_directory }}/cron.php\""
- name: Configure auto backup of nextcloud data directory
cron:
hour: 1
minute: 0
job: "{{ global_helper_directory }}/backup_files.sh {{ nextcloud_data_directory | quote }} {{ domain | quote }}"
name: "backup nextcloud data of {{ domain }}"
state: present

Loading…
Cancel
Save