updated scripts to include new programs
This commit is contained in:
19
roles/restic/files/.autorestic.yml
Normal file
19
roles/restic/files/.autorestic.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: 2
|
||||
|
||||
locations:
|
||||
db:
|
||||
from: /srv/backups/somefile
|
||||
to: esh-local
|
||||
options:
|
||||
forget:
|
||||
keep-last: 5
|
||||
keep-daily: 7
|
||||
keep-weekly: 4
|
||||
keep-monthly: 12
|
||||
keep-yearly: 7
|
||||
|
||||
backends:
|
||||
esh-local:
|
||||
type: local
|
||||
path: /mnt/backup/restic/repo/esh
|
||||
key: 'Reputable-Evidence-Feed5-Undergo'
|
||||
22
roles/restic/tasks/main.yml
Normal file
22
roles/restic/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: create backup folder
|
||||
file:
|
||||
path: "/srv/backups/autorestic/"
|
||||
state: directory
|
||||
|
||||
- name: copy configuration
|
||||
copy:
|
||||
src: .autorestic.yml
|
||||
dest: "/srv/backups/autorestic/.autorestic.yml"
|
||||
|
||||
- name: Get autorestic installer
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh
|
||||
dest: /tmp/autorestic_install.sh
|
||||
mode: '0755'
|
||||
|
||||
- name: Install autorestic
|
||||
shell:
|
||||
cmd: /tmp/autorestic_install.sh
|
||||
executable: /bin/sh
|
||||
become: yes
|
||||
Reference in New Issue
Block a user