Backup "/var/www/html/wiki/images"
This commit is contained in:
parent
ca852e9edd
commit
0ff0d463f1
3 changed files with 17 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
/backups/*
|
||||
!/backups/.keep
|
||||
/playbooks/**/*.retry
|
||||
/vendor/*
|
||||
!/vendor/.keep
|
||||
|
|
0
backups/.keep
Normal file
0
backups/.keep
Normal file
15
playbooks/backup.yml
Normal file
15
playbooks/backup.yml
Normal 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
|
Reference in a new issue