forked from paulfantom/ansible-restic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.yml
70 lines (62 loc) · 2.3 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
restic_version: '0.12.0'
# Must we perform download and propagation from localhost (true) or not (false)
restic_download_localhost: true
restic_user: root
restic_group: "{{ restic_user }}"
restic_shell: "/bin/false"
restic_home: "/var/lib/restic"
restic_install_path: '/usr/local/bin'
restic_initialize_repos: true
restic_cron_mailto: "{{ restic_user }}"
restic_cron_stdout_file: null
restic_cron_stderr_file: null
restic_cron_use_logger: false
restic_cron_logger_capture_stderr: false
restic_logger_tag_prune: "restic-prune"
restic_logger_tag_backup: "restic-backup"
restic_logger_tag_check_repo: "restic-check-repo"
restic_sudo_command_whitelist: []
# restic_sudo_command_whitelist:
# - command: /usr/bin/some_backup_related_command_that_needs_sudo
# runas: root
restic_repos: []
# restic_repos:
# - name: s3-example
# url: "s3:s3.amazonaws.com/bucket_name/restic"
# password: "dolphins"
# remote_credentials:
# aws_access_key_id: "AWS_ACCESS_KEY_ID"
# aws_secret_access_key: "AWS_SECRET_ACCESS_KEY"
# jobs:
# - command: 'restic backup /srv'
# at: '0 1 * * *'
# retention_time: '17 5 * * *'
# retention:
# last: 2
# hourly: 4
# daily: 10
# weekly: 9
# monthly: 3
# yearly: 10
# tags:
# - special
# - name: backblaze-example
# url: "b2:bucketname:path/to/repo"
# password: "correcthorsebatterystaple"
# remote_credentials:
# b2_account_id: "B2_ACCOUNT_ID"
# b2_account_key: "B2_ACCOUNT_KEY"
# jobs:
# - command: 'restic backup /var'
# at: '0 4 * * *'
# - command: 'restic backup /home'
# at: '0 3 * * *'
# user: 'restic'
# - name: mybackupserver
# url: "rest:http://mybackupserver:8888/{{inventory_hostname}}" # useful to create one repo per host
# password: "{{ lookup('password', inventory_dir + '/restic_pass/' + inventory_hostname + ' length=22') }}" # to create passfile per host
# jobs:
# - command: "openvpn -c /etc/myvpn.ovpn && ionice -c2 -n7 nice -n5 restic backup /home && curl -fsS --retry 4 https://hc-ping.com/XXXXXX-.." # adjusted niceness I/O priority and use pre and post command
# at: "{{ 60 |random(seed=inventory_hostname) }} 4 * * *" # use random minutes based on inventory hostname
# check: false # don't check repository from client. Instead, you can check directly from the server.