|
|
@@ -1,4 +1,4 @@
|
|
|
-- name: create backup directory
|
|
|
+- name: create website backup directory
|
|
|
file:
|
|
|
path: "{{ backup_website }}"
|
|
|
state: directory
|
|
|
@@ -11,19 +11,7 @@
|
|
|
dest: "{{ backup_website }}"
|
|
|
with_items: "sites"
|
|
|
|
|
|
-### Sonerezh and sound ###
|
|
|
-- name: create backup directory
|
|
|
- file:
|
|
|
- path: "{{ backup_website }}/sound"
|
|
|
- state: directory
|
|
|
- delegate_to: localhost
|
|
|
-
|
|
|
-- name: backup sound website
|
|
|
- synchronize:
|
|
|
- mode: pull
|
|
|
- src: /var/www/sound/sonerezh
|
|
|
- dest: "{{ backup_website }}/sound"
|
|
|
-
|
|
|
+### Sonerezh database and sound ###
|
|
|
- name: backup sonerezh database
|
|
|
mysql_db:
|
|
|
state: dump
|
|
|
@@ -41,8 +29,8 @@
|
|
|
- name: backup sound data
|
|
|
synchronize:
|
|
|
mode: pull
|
|
|
- src: /var/www/sound/Music
|
|
|
- dest: "{{ backup_website }}/sound"
|
|
|
+ src: /var/Music
|
|
|
+ dest: "{{ backup_website }}"
|
|
|
|
|
|
### Owncloud ###
|
|
|
- name: backup owncloud database
|
|
|
@@ -59,8 +47,37 @@
|
|
|
src: /var/www/owncloud-sqlbkp.bak
|
|
|
dest: "{{ backup_website }}"
|
|
|
|
|
|
-- name: backup owncloud website
|
|
|
+- name: backup owncloud data
|
|
|
synchronize:
|
|
|
mode: pull
|
|
|
- src: /var/www/owncloud
|
|
|
+ src: /var/owncloud_data
|
|
|
dest: "{{ backup_website }}"
|
|
|
+
|
|
|
+### Apache virtual hosts ###
|
|
|
+- name: create apache hosts backup directory
|
|
|
+ file:
|
|
|
+ path: "{{ backup_apache }}"
|
|
|
+ state: directory
|
|
|
+ delegate_to: localhost
|
|
|
+
|
|
|
+- name: backup apache virtual hosts
|
|
|
+ synchronize:
|
|
|
+ mode: pull
|
|
|
+ src: "/etc/apache2/sites-available/{{ item }}"
|
|
|
+ dest: "{{ backup_apache }}"
|
|
|
+ with_items: "apache_hosts"
|
|
|
+
|
|
|
+### Apache certificates ###
|
|
|
+- name: create certificates backup directory
|
|
|
+ file:
|
|
|
+ path: "{{ backup_certs }}"
|
|
|
+ state: directory
|
|
|
+ delegate_to: localhost
|
|
|
+
|
|
|
+- name: backup certificates
|
|
|
+ synchronize:
|
|
|
+ mode: pull
|
|
|
+ src: "/etc/letsencrypt/live/{{ item }}"
|
|
|
+ dest: "{{ backup_certs }}"
|
|
|
+ with_items: "certificates"
|
|
|
+
|