/
main.yml
143 lines (124 loc) · 4.72 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
system_python_version: "{{ (ansible_distribution_release == 'focal') | ternary('3', '') }}"
backup_enabled: yes # Enable the role
backup_remove: no # Set yes for uninstall the role from target system
backup_cron: yes # Setup cron tasks for backup
backup_user: root # Run backups as user
backup_group: "{{ backup_user }}"
backup_home: /etc/duply # Backup configuration directory
backup_work: /var/duply # Working directory
backup_temp_dir: /tmp
backup_duplicity_pkg: duplicity
backup_duplicity_version: # Set duplicity version
backup_duplicity_ppa: false
# Logging
backup_logdir: /var/log/duply # Place where logs will be keepped
backup_logrotate: yes # Setup logs rotation
backup_prometheus: no
backup_prometheus_dir: /var/lib/node_exporter
backup_node_exporter_group: "{{ node_exporter_system_group | default('node-exp') }}"
# Posgresql
backup_postgres_user: postgres
backup_postgres_host: ""
backup_postgres_port: 5432
# Mysql
backup_mysql_host: ""
backup_mysql_user: ""
backup_mysql_pass: ""
# Redis
backup_redis_user: redis
backup_redis_group: "{{ backup_redis_user }}"
backup_profiles: [] # Setup backup profiles
# Ex. backup_profiles:
# - name: www # required param
# schedule: 0 0 * * 0 # if defined enabled cronjob
# source: /var/www
# max_age: 10D
# target: s3://my.bucket/www
# exclude:
# - *.pyc
# - name: postgresql
# schedule: 0 4 * * *
# action: restore # Choose action: backup/restore (default is backup)
# source: postgresql://db_name
# target: s3://my.bucket/postgresql
# Default values (overide them in backup profiles bellow)
# =======================================================
# (every value can be replaced in jobs individually)
# GPG
backup_gpg_key: disabled
backup_gpg_pw: ""
backup_gpg_opts: ''
# TARGET
# syntax is
# scheme://[user:password@]host[:port]/[/]path
# probably one out of
# file://[/absolute_]path
# ftp[s]://user[:password]@other.host[:port]/some_dir
# hsi://user[:password]@other.host/some_dir
# cf+http://container_name
# imap[s]://user[:password]@host.com[/from_address_prefix]
# rsync://user[:password]@other.host[:port]::/module/some_dir
# rsync://user@other.host[:port]/relative_path
# rsync://user@other.host[:port]//absolute_path
# # for the s3 user/password are AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY
# s3://[user:password]@host/bucket_name[/prefix]
# s3+http://[user:password]@bucket_name[/prefix]
# ssh://user[:password]@other.host[:port]/some_dir
# tahoe://alias/directory
# webdav[s]://user[:password]@other.host/some_dir
backup_target: 'file:///var/backup'
# optionally the username/password can be defined as extra variables
backup_target_user:
backup_target_pass:
# Time frame for old backups to keep, Used for the "purge" command.
# see duplicity man page, chapter TIME_FORMATS)
backup_max_age: 1M
# Number of full backups to keep. Used for the "purge-full" command.
# See duplicity man page, action "remove-all-but-n-full".
backup_max_full_backups: 1
# forces a full backup if last full backup reaches a specified age
backup_full_max_age: 1M
# set the size of backup chunks to VOLSIZE MB instead of the default 25MB.
backup_volsize: 50
# verbosity of output (error 0, warning 1-2, notice 3-4, info 5-8, debug 9)
backup_verbosity: 3
backup_exclude: [] # List of filemasks to exlude
# List of packages for schemes
backup_scheme_deps:
azure:
- python{{ system_python_version }}-azure-storage
b2:
- backblaze-b2
copy:
- python{{ system_python_version }}-urllib3
fish:
- lftp
ftp:
- lftp
ftps:
- lftp
gs:
- python{{ system_python_version }}-boto
rsync:
- rsync
mega:
- megatools
onedrive:
- python{{ system_python_version }}-requests
- python{{ system_python_version }}-requests-oauthlib
s3:
- python{{ system_python_version }}-boto
scp:
- python{{ system_python_version }}-paramiko
sftp:
- python{{ system_python_version }}-paramiko
pexpect+scp:
- openssh-client
- python{{ system_python_version }}-pexpect
pexpect+sftp:
- openssh-client
- python{{ system_python_version }}-pexpect
swift:
- python{{ system_python_version }}-swiftclient
- python{{ system_python_version }}-keystoneclient