1
0
Fork 0

Backup "/var/www/html/wiki/images"

This commit is contained in:
Alex Kotov 2020-01-24 07:21:12 +05:00
parent ca852e9edd
commit 0ff0d463f1
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 17 additions and 0 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
/backups/*
!/backups/.keep
/playbooks/**/*.retry /playbooks/**/*.retry
/vendor/* /vendor/*
!/vendor/.keep !/vendor/.keep

0
backups/.keep Normal file
View file

15
playbooks/backup.yml Normal file
View file

@ -0,0 +1,15 @@
---
- hosts: wiki.crypto-libertarian.com
tasks:
- name: Archive "/var/www/html/wiki/images"
archive:
path: /var/www/html/wiki/images
dest: /tmp/wiki_images.tar.gz
format: gz
owner: root
group: root
mode: 'u=rw,g=r,o='
- name: Fetch archive of "/var/www/html/wiki/images"
fetch:
src: /tmp/wiki_images.tar.gz
dest: ../backups