-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-example.yml
More file actions
214 lines (188 loc) · 8.1 KB
/
config-example.yml
File metadata and controls
214 lines (188 loc) · 8.1 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# yaml-language-server: $schema=config.schema.json
backup:
# Folder where the excludes file are saved into
# [REQUIRED]
exclude_output: /path/to/exclude-file
# Starts of the backup plans (the key is the identifier)
targets:
full_backup:
# Configuration of the remote server
# [REQUIRED]
remote:
# Put the server hostname/IPv4 address here
# [REQUIRED]
host: host.domain
# Remote rsync server port. 873 is the default port
# [OPTIONAL]
port: 1234
# The username to connect with
# [OPTIONAL]
user: admin
# The password file for non-interactive mode. It is not
# strictly required, since the remote rsync service might
# not need the authentication step, however, if a password
# is required for the specified username (if any), then it
# is advisable to use the password_file otherwise interactive
# mode is enabled and automatic backup wont work as expected.
# [OPTIONAL, sligthly REQUIRED]
password_file: /path/to/password-file
# Describes the destination of the backup in the form
# of <module>/<folder> as required by rsync
# [REQUIRED]
dest:
module: module_name # The module name [REQUIRED]
folder: dst_folder # Destination folder under the module [REQUIRED]
# RSync Configuration for the backup plan
# [REUQUIRED]
rsync:
# Folder where the expanded excludes are saved into.
# Overwrites the global exclude_output variable.
# [OPTIONAL]
exclude_output_folder: /path/to/exclude/output
# Base file with a bunch of paths to exclude
# [CAN BE OMITTED]
exclude_from: /path/to/base-exclude-file
# Put additional folders/files here (absolute path)
# [IS A LIST OF PATHS, CAN BE OMITTED]
excludes:
- /prova-exclude/*
# - additional paths here
# Includes removes paths from the exclusion if they exists.
# It can be useful in case one would like to have a general
# excludes starting file and then simply modify the base file
# to generate the final exclude plan file.
# If specific files/folders do not exists they are appended
# to the rsync command in the "source" part
#
# [IS A LIST OF PATHS, CAN BE OMITTED]
includes:
- /prova-includes/*
# - additional paths here
# The sources to copy into the remote
# [IT IS A LIST OF PATHS, REQUIRED]
sources:
- '/path/to/source-folder-1'
- '/path/to/source-folder-2'
# - additional paths here
# Additional options to pass to the rsync command
# [OPTIONAL]
options:
# Enable/Disable verbosity
# [CAN BE OMITTED]
verbose: true # or false
# Shows the progress
# [CAN BE OMITTED]
show_progres: true # or false
# Enable or disable compression before transmitting
# [CAN BE OMITTED]
compress: true # or false
# Enable/Disable delete mode. In the case it is enabled
# a mode must be provided, different modes are:
# before, after, during, delay and finally excluded
# [OPTIONAL, default=delete-after]
delete: after
# Output a change-summary for all updates
# [OPTIONAL, default=false]
itemize_changes: true # or false
# Keep specials files likes UNIX sockets or FIFOs.
# To enable this option you shall check that the target
# filesystem support this kind of files
# [OPTIONAL, default=false]
keep_specials: false # or true
# Keep devices file (`/dev/null`, `/dev/sda`, ...)
# To enable this option you shall check that the target
# filesystem support this kind of files
# [OPTIONAL, default=false]
keep_devices: false # or true
# Describes the backup frequency as a cronjob.
# null are converted into * wildcards
# Setting every field to null means * * * * * in cron string
# [REQUIRED]
schedule:
weekday: null # Range 0-7 (Sun = 0 or 7)
month: null # Range 1-12
day: null # Day of the month Range 1-31
hour: null # Range 0-23
minute: null # Range 0-59
# Sets the notification system, i.e., the way in which the user
# is notified about the backup. Up to now, only the email system
# is active. All notification systems are used at once.
# [OPTIONAL]
notification:
# Using the email notification system. If the SMTP can be inferred
# from the email domain than the SMTP section is not required,
# otherwise it is required and if not present an error occurs.
# Currently known domains are: gmail, outlook, yahoo and icloud
# [OPTIONAL]
email:
# The email of the sender
# [REQUIRED]
from: user.email@domain.com
# A list of recipients for the notification email.
# [REQUIRED AT LEAST 1]
to:
- dstuser.email@domain.com
# - additional recipients here
# The account password used to authentication to the SMTP server
# [REQUIRED]
password: account_password_here
# SMTP configuration if a custom email server is provided
# or an uknown domain is detected
# [OPTIONAL]
smtp:
server: host.domain # The SMTP server host [REQUIRED]
port: 1234 # The SMTP Server remote port [REQUIRED]
# Tell if the SMTP server has SSL enabled or not. Notice that
# the server must at least has TLS enabled otherwise this
# method of notification will be ignored
# [OPTIONAL, default=False]
ssl: false # or true
# Webhooks notifications. It is a list of notification setting.
# Each of them must defines the end-point, on which events
# to configure the notification, the timeout for retrying
# and additional (optional) authorization methods.
#
# Active possible endpoints are: Discord.
#
# [OPTIONAL]
webhooks:
# Here is the the name of the service. There can be duplicated
# services ( at the end each of them is assigned to a unique id )
# [REQUIRED, string]
- name: discord-on-failure
# The type of the webhook service endpoint. There is a
# limited set of available endpoints.
# [REQUIRED]
type: discord
# The endpoint URL of the service
# [REQUIRED]
url: https://discord.com/api/webhooks/...
# Subscribed Events: failure, success
# [OPTIONAL, default=all events]
events: [ failure ]
# Timeout for receiving the response after sending the notification.
# Value can be expressed in seconds (s), milliseconds (ms)
# and microseconds (us).
# [OPTIONAL, default=no timeout, wait until response arrive]
timeout: 5s
# Maximum number of retries
# [OPTIONAL, default=0]
max_retries: 2
# Additional headers used for the requests, such
# as Authentication and Authorization tokens
# [OPTIONAL, default=null]
headers: null
# Authorization: Bearer ${WEBHOOK_TOKEN}
# - additional webhooks endpoints
# Log retention policy overwriting for the current target. It is not required
# and by default log files are kept spare up to a maximum of 10 files. Once the
# cap has hit, 10 latest recently produced logs are compressed into a zip
# archive and after 1 week removed.
# [ OPTIONAL ]
log_retention:
# Maximum number of spare log files
# [ REQUIRED, default=10 ]
max_spare_files: 10
# Retention window in days for compressed batch of files.
# [ REQUIRED, default=7 ]
retention_window: 7 # in days