-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
conf.example.yml
315 lines (312 loc) · 14.5 KB
/
conf.example.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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
source:
github:
- token: some-token
# alternatively, specify token in a file, relative to current working directory when executed.
# token_file: token.txt
user: some-user # the user you want to clone the repositories from.
# if you want to get everything from your user, leave out the user parameter and just use the token.
# for the clone process, either use:
# - username + password
# - sshkey
# - token
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
exclude: # this excludes the repos "foo" and "bar"
- foo
- bar
include: # this includes the repo "foobar"
- foobar
excludeorgs: # this excludes repos from the organizations "foo" and "bar"
- foo
- bar
includeorgs: # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
wiki: true # includes wiki too
issues: true # back up issues, works only locally
starred: true # includes the user's starred repositories too
filter:
stars: 100 # only clone repos with 100 stars
lastactivity: 1y # only clone repos which had activity during the last year
excludearchived: true
languages: # only clone repositories with the following languages
- go
- java
excludeforks: true # exclude forked repositories
gists: true # clone gists too
gitea:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
user: some-user # the user you want to clone the repositories from.
url: http(s)://url-to-gitea # if empty, it uses https://gitea.com
# if you want to get everything from your user, leave out the user parameter and just use the token.
# for the clone process, either use:
# - username + password
# - sshkey
# - token
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
exclude: # this excludes the repos "foo" and "bar"
- foo
- bar
include: # this includes the repo "foobar"
- foobar
excludeorgs: # this excludes repos from the organizations "foo" and "bar"
- foo
- bar
includeorgs: # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
wiki: true # includes wiki too
issues: true # back up issues, works only locally
starred: true # includes the user's starred repositories too
filter:
stars: 100 # only clone repos with 100 stars
lastactivity: 1y # only clone repos which had activity during the last year
excludearchived: true
languages: # only clone repositories with the following languages
- go
- java
excludeforks: true # exclude forked repositories
gogs:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
user: some-user # the user you want to clone the repositories from.
url: http(s)://url-to-gogs # no default value
# if you want to get everything from your user, leave out the user parameter and just use the token.
# for the clone process, either use:
# - username + password
# - sshkey
# - token
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
exclude: # this excludes the repos "foo" and "bar"
- foo
- bar
include: # this includes the repo "foobar"
- foobar
excludeorgs: # this excludes repos from the organizations "foo" and "bar"
- foo
- bar
includeorgs: # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
wiki: true # includes wiki too
issues: true # back up issues, works only locally
filter:
stars: 100 # only clone repos with 100 stars
lastactivity: 1y # only clone repos which had activity during the last year
excludeforks: true # exclude forked repositories
gitlab:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
user: some-user # the user you want to clone the repositories from.
url: http(s)://url-to-gitlab # if empty, it uses https://gitlab.com
# if you want to get everything from your user, leave out the user parameter and just use the token.
# for the clone process, either use:
# - username + password
# - sshkey
# - token
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
exclude: # this excludes the repos "foo" and "bar"
- foo
- bar
include: # this includes the repo "foobar"
- foobar
excludeorgs: # this excludes repos from the organizations "foo" and "bar"
- foo
- bar
includeorgs: # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
wiki: true # includes wiki too
issues: true # back up issues, works only locally
starred: true # includes the user's starred repositories too
filter:
stars: 100 # only clone repos with 100 stars
lastactivity: 1y # only clone repos which had activity during the last year
excludearchived: true
languages: # only clone repositories with the following languages
- go
- java
excludeforks: true # exclude forked repositories
bitbucket:
- user: some-user # the user you want to clone the repositories from.
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
url: http(s)://url-to-bitbucket # if empty, it uses https://bitbucket.org
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
exclude: # this excludes the repos foo and bar
- foo
- bar
include: # this includes the repo "foobar"
- foobar
excludeorgs: # this excludes repos from the workpaces "foo" and "bar"
- foo
- bar
includeorgs: # this includes repos from the workspaces "foo1" and "bar1"
- foo1
- bar1
filter:
lastactivity: 1y # only clone repos which had activity during the last year
onedev:
- user: some-user # the user you want to clone the repositories from.
url: http(s)://url-to-onedev # if empty, it uses https://bitbucket.org
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
exclude: # this excludes the repos foo and bar
- foo
- bar
include:
- foobar
filter:
lastactivity: 1y # only clone repos which had activity during the last year
excludeforks: true # exclude forked repositories
issues: true # back up issues, works only locally
sourcehut:
- token: some-token # as of now only the legacy api works, use the legacy token
# token_file: token.txt # alternatively, specify token in a file
user: some-user # the user you want to clone the repositories from.
url: http(s)://url-to-sourcehut # if empty, it uses https://git.sr.ht
# if you want to get everything from your user, leave out the user parameter and just use the token.
# for the clone process, either use:
# - username + password
# - sshkey
# - token
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
exclude: # this excludes the repos "foo" and "bar"
- foo
- bar
include: # this includes the repo "foobar"
- foobar
wiki: true # includes wiki too
filter:
lastactivity: 1y # only clone repos which had activity during the last year
any:
- url: url-to-any-repo # can be https, http or ssh
user: your-preferred-user # the user to want to associate with this repo, default: git
username: your-user # user is used to clone the repo with
password: your-password
ssh: true # can be true or false
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
- url: can-also-be-a-local-path-to-a-bare-repo
destination:
gitea:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
user: some-name # can be a user or an organization, it must exist on the system
url: http(s)://url-to-gitea
createorg: true # creates an organization if it doesn't exist already, if no user is set it creates an organization with the name of the original author
mirrorinterval: 2h0m0s # interval to pull changes from source repo, will be removed in one of the next releases
lfs: false # trigger to enable lfs on gitea
mirror:
enabled: true # if set to true, gickup will clone the repository and push it to gitea itself
mirrorinterval: 2h0m0s # interval to pull changes from source repo
visibility:
repositories: private # private, public, default: private
organizations: private # private, limited, public, default: private
gogs:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
user: some-name # can be a user or an organization, it must exist on the system
url: http(s)://url-to-gogs
createorg: true # creates an organization if it doesn't exist already, if no user is set it creates an organization with the name of the original author
mirror:
enabled: true # if set to true, gickup will clone the repository and push it to gogs itself
visibility:
repositories: private # private, public, default: private
gitlab:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
url: http(s)://url-to-gitlab
mirror:
enabled: true # if set to true, gickup will clone the repository and push it to gitlab itself
github:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
organization: whatever # name of the organization to want to backup to
visibility:
repositories: private # private, public, default: private
force: false # force push to destination
onedev:
- token: some-token
# token_file: token.txt # alternatively, specify token in a file
url: http(s)://url-to-onedev
organization: whatever # name of the parent project you want to backup to
force: false # force push to destination
sourcehut:
- token: some-token # as of now only the legacy api works, use the legacy token
# token_file: token.txt # alternatively, specify token in a file
user: some-name # can be a user or an organization, it must exist on the system
sshkey: /path/to/key # if empty, it uses your home directories' .ssh/id_rsa, sourcehut needs ssh to push to the repository
url: http(s)://url-to-sourcehut # if empty, it uses https://git.sr.ht
visibility:
repositories: private # public, unlisted, private, default: public
force: false # force push to destination
local:
# Export this path from Docker with a volume to make it accessible and more permanent.
- path: /some/path/gickup
structured: true # checks repos out like hostersite/user|organization/repo
zip: true # zips the repository after cloned and removes the repository afterwards
keep: 5 # only keeps x backups
bare: true # clone the repositories as bare
lfs: true # clone lfs repos, !! ATTENTION !! git and git-lfs must be installed on the system!
s3:
- endpoint: somewhere:9000 # whatever your s3 endpoint is
structured: true # checks repos out like hostersite/user|organization/repo
bucket: your-bucket-name
accesskey: your-access-key # can be an environment variable, just don't add a $ in front of it
secretkey: your-secret-key # can be an environment variable, just don't add a $ in front of it
usessl: true # wheter to use ssl or not
cron: 0 22 * * * # optional - when cron is not provided, the program runs once and exits.
# Otherwise, it runs according to the cron schedule.
# See timezone commentary in docker-compose.yml for making sure this container runs
# in the timezone you want.
# For more information on crontab or testing: https://crontab.guru/
log: # optional
timeformat: 2006-01-02 15:04:05 # you can use a custom time format, use https://yourbasic.org/golang/format-parse-string-time-date-example/ to check how date formats work in go
# or set it as environment variable GICKUP_TIME_FORMAT
file-logging: # optional
dir: log # directory to log into
file: gickup.log # file to log into
maxage: 7 # keep logs for 7 days
metrics:
prometheus: # optional, needs to be provided in the first config
endpoint: /metrics
listen_addr: ":6178" # default listens on port 6178 on all IPs.
heartbeat: # optional - upon successful backup, makes a GET http request to one or more URLs. This is useful for use with monitoring services such as healthchecks.io or deadmanssnitch.com
urls:
- http(s)://url-to-make-request-to
- http(s)://another-url-to-make-request-to
push:
ntfy:
- url: http(s)://url-to-ntfy/your-topic
token: your-token
user: your-user
password: your-password
gotify:
- url: http(s)://url-to-gotify
token: your-token
---
# you can define separate source and destination pairs,
# like "mirror all repos from github to gitea but keep gitlab repos up-to-date in ~/backup"
# if cron is defined in the first config, this cron interval will be used for all the other confgurations, except it has one of its own.
# if cron is not enabled for the first config, cron will not run for any other configuration
# metrics configuration is always used from the first configuration