2021-12-09 17:56:55 +01:00
source :
github :
2021-12-15 07:09:05 +01:00
- token : some-token
2021-12-29 07:49:02 +01:00
# alternatively, specify token in a file, relative to current working directory when executed.
# token_file: token.txt
2021-12-15 07:09:05 +01:00
user : some-user # the user you want to clone the repositories from.
2021-12-15 06:56:35 +01:00
# 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
2021-12-15 07:09:05 +01:00
username : your-user # user is used to clone the repo with
password : your-password
2021-12-09 17:56:55 +01:00
ssh : true # can be true or false
sshkey : /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
2021-12-15 06:56:35 +01:00
exclude : # this excludes the repos "foo" and "bar"
2021-12-09 17:56:55 +01:00
- foo
- bar
2021-12-15 06:56:35 +01:00
include : # this includes the repo "foobar"
2021-12-13 11:53:20 +01:00
- foobar
2021-12-15 06:56:35 +01:00
excludeorgs : # this excludes repos from the organizations "foo" and "bar"
2021-12-09 17:56:55 +01:00
- foo
- bar
2022-01-29 15:44:42 +01:00
includeorgs : # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
2021-12-29 18:27:19 +01:00
wiki : true # includes wiki too
2023-12-01 07:58:53 +01:00
issues : true # back up issues, works only locally
2022-02-22 07:42:05 +01:00
starred : true # includes the user's starred repositories too
2023-02-20 16:05:01 +01:00
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
2023-06-04 08:30:02 +02:00
excludeforks : true # exclude forked repositories
2021-12-09 17:56:55 +01:00
gitea :
2021-12-15 07:09:05 +01:00
- token : some-token
2021-12-29 07:49:02 +01:00
# token_file: token.txt # alternatively, specify token in a file
2021-12-15 07:09:05 +01:00
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
2021-12-15 06:56:35 +01:00
# 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
2021-12-15 07:09:05 +01:00
username : your-user # user is used to clone the repo with
password : your-password
2021-12-09 17:56:55 +01:00
ssh : true # can be true or false
sshkey : /path/to/key # if empty, it uses your home directories' .ssh/id_rsa
2021-12-19 23:42:38 +01:00
exclude : # this excludes the repos "foo" and "bar"
- foo
- bar
2021-12-15 06:56:35 +01:00
include : # this includes the repo "foobar"
- foobar
excludeorgs : # this excludes repos from the organizations "foo" and "bar"
2021-12-09 17:56:55 +01:00
- foo
- bar
2022-01-29 15:44:42 +01:00
includeorgs : # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
2021-12-29 18:27:19 +01:00
wiki : true # includes wiki too
2023-12-01 07:58:53 +01:00
issues : true # back up issues, works only locally
2022-02-22 07:42:05 +01:00
starred : true # includes the user's starred repositories too
2023-02-20 16:05:01 +01:00
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
2023-06-04 08:30:02 +02:00
excludeforks : true # exclude forked repositories
2021-12-09 17:56:55 +01:00
gogs :
2021-12-15 07:09:05 +01:00
- token : some-token
2021-12-29 07:49:02 +01:00
# token_file: token.txt # alternatively, specify token in a file
2021-12-15 07:09:05 +01:00
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
2022-01-29 15:44:42 +01:00
includeorgs : # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
2021-12-29 18:27:19 +01:00
wiki : true # includes wiki too
2023-12-01 07:58:53 +01:00
issues : true # back up issues, works only locally
2023-02-20 16:05:01 +01:00
filter :
stars : 100 # only clone repos with 100 stars
lastactivity : 1y # only clone repos which had activity during the last year
2023-06-04 08:30:02 +02:00
excludeforks : true # exclude forked repositories
2021-12-15 07:09:05 +01:00
gitlab :
- token : some-token
2021-12-29 07:49:02 +01:00
# token_file: token.txt # alternatively, specify token in a file
2021-12-15 07:09:05 +01:00
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
2021-12-15 06:56:35 +01:00
include : # this includes the repo "foobar"
2021-12-13 11:53:20 +01:00
- foobar
2021-12-15 06:56:35 +01:00
excludeorgs : # this excludes repos from the organizations "foo" and "bar"
2021-12-09 17:56:55 +01:00
- foo
- bar
2022-01-29 15:44:42 +01:00
includeorgs : # this includes repos from the organizations "foo1" and "bar1"
- foo1
- bar1
2021-12-29 18:27:19 +01:00
wiki : true # includes wiki too
2023-12-01 07:58:53 +01:00
issues : true # back up issues, works only locally
2022-02-22 07:42:05 +01:00
starred : true # includes the user's starred repositories too
2023-06-04 08:30:02 +02:00
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
2021-12-09 17:56:55 +01:00
bitbucket :
2021-12-15 07:09:05 +01:00
- user : some-user # the user you want to clone the repositories from.
2024-08-26 11:10:10 +02:00
- token : some-token
# token_file: token.txt # alternatively, specify token in a file
2021-12-15 07:09:05 +01:00
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
2021-12-09 17:56:55 +01:00
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
2024-08-26 11:10:10 +02:00
include : # this includes the repo "foobar"
2021-12-13 11:53:20 +01:00
- foobar
2024-08-26 11:10:10 +02:00
excludeorgs : # this excludes repos from the workpaces "foo" and "bar"
- foo
- bar
includeorgs : # this includes repos from the workspaces "foo1" and "bar1"
- foo1
- bar1
2023-02-20 16:05:01 +01:00
filter :
lastactivity : 1y # only clone repos which had activity during the last year
2022-08-11 21:31:03 +02:00
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
2023-02-20 16:05:01 +01:00
filter :
lastactivity : 1y # only clone repos which had activity during the last year
2023-06-04 08:30:02 +02:00
excludeforks : true # exclude forked repositories
2023-12-01 07:58:53 +01:00
issues : true # back up issues, works only locally
2022-11-16 08:09:33 +01:00
sourcehut :
2023-08-17 08:32:45 +02:00
- token : some-token # as of now only the legacy api works, use the legacy token
2022-11-16 08:09:33 +01:00
# 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
2023-02-20 16:05:01 +01:00
filter :
lastactivity : 1y # only clone repos which had activity during the last year
2022-07-18 13:59:20 +02:00
any :
- url : url-to-any-repo # can be https, http or ssh
2024-04-03 08:24:23 +02:00
user: your-preferred-user # the user to want to associate with this repo, default : git
2022-07-18 13:59:20 +02:00
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
2021-12-09 17:56:55 +01:00
destination :
gitea :
2021-12-15 07:09:05 +01:00
- token : some-token
2021-12-29 07:49:02 +01:00
# token_file: token.txt # alternatively, specify token in a file
2023-08-15 18:13:21 +02:00
user : some-name # can be a user or an organization, it must exist on the system
2021-12-15 07:09:05 +01:00
url : http(s)://url-to-gitea
2022-12-09 15:45:13 +01:00
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
2024-04-15 07:10:49 +02:00
mirrorinterval : 2h0m0s # interval to pull changes from source repo, will be removed in one of the next releases
2023-10-04 08:09:42 +02:00
lfs : false # trigger to enable lfs on gitea
2024-04-15 07:10:49 +02:00
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
2022-12-09 15:45:13 +01:00
visibility :
repositories: private # private, public, default : private
organizations: private # private, limited, public, default : private
2021-12-09 17:56:55 +01:00
gogs :
2021-12-15 07:09:05 +01:00
- token : some-token
2021-12-29 07:49:02 +01:00
# token_file: token.txt # alternatively, specify token in a file
2023-08-15 18:13:21 +02:00
user : some-name # can be a user or an organization, it must exist on the system
2021-12-15 07:09:05 +01:00
url : http(s)://url-to-gogs
2022-12-09 15:45:13 +01:00
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
2024-04-15 07:10:49 +02:00
mirror :
enabled : true # if set to true, gickup will clone the repository and push it to gogs itself
2022-12-09 15:45:13 +01:00
visibility :
repositories: private # private, public, default : private
2021-12-09 17:56:55 +01:00
gitlab :
2021-12-15 07:09:05 +01:00
- token : some-token
2021-12-29 07:49:02 +01:00
# token_file: token.txt # alternatively, specify token in a file
2021-12-15 07:09:05 +01:00
url : http(s)://url-to-gitlab
2024-04-16 13:34:05 +02:00
mirror :
enabled : true # if set to true, gickup will clone the repository and push it to gitlab itself
2023-08-15 18:13:21 +02:00
github :
- token : some-token
# token_file: token.txt # alternatively, specify token in a file
2023-09-29 12:26:03 +02:00
organization : whatever # name of the organization to want to backup to
2023-08-15 18:13:21 +02:00
visibility :
repositories: private # private, public, default : private
2023-09-29 17:10:06 +02:00
force : false # force push to destination
2023-08-15 18:13:21 +02:00
onedev :
- token : some-token
# token_file: token.txt # alternatively, specify token in a file
url : http(s)://url-to-onedev
2023-09-29 12:26:03 +02:00
organization : whatever # name of the parent project you want to backup to
2023-09-29 17:10:06 +02:00
force : false # force push to destination
2023-08-15 18:13:21 +02:00
sourcehut :
2023-08-17 08:32:45 +02:00
- token : some-token # as of now only the legacy api works, use the legacy token
2023-08-15 18:13:21 +02:00
# 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
2023-08-16 14:04:59 +02:00
url : http(s)://url-to-sourcehut # if empty, it uses https://git.sr.ht
2023-08-15 18:13:21 +02:00
visibility :
repositories: private # public, unlisted, private, default : public
2023-09-29 17:10:06 +02:00
force : false # force push to destination
2021-12-09 17:56:55 +01:00
local :
2022-02-07 08:18:36 +01:00
# Export this path from Docker with a volume to make it accessible and more permanent.
2021-12-13 08:15:48 +01:00
- path : /some/path/gickup
2021-12-16 17:22:44 +01:00
structured : true # checks repos out like hostersite/user|organization/repo
2023-01-08 20:22:07 +01:00
zip : true # zips the repository after cloned and removes the repository afterwards
keep : 5 # only keeps x backups
2023-01-11 11:00:48 +01:00
bare : true # clone the repositories as bare
2023-07-18 10:56:43 +02:00
lfs : true # clone lfs repos, !! ATTENTION !! git and git-lfs must be installed on the system!
2024-08-26 13:46:16 +02:00
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
2022-02-07 08:18:36 +01:00
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/
2021-12-13 08:15:48 +01:00
2021-12-15 06:56:35 +01:00
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
2022-07-18 13:59:20 +02:00
# or set it as environment variable GICKUP_TIME_FORMAT
2021-12-15 06:56:35 +01:00
file-logging : # optional
dir : log # directory to log into
file : gickup.log # file to log into
2021-12-19 23:42:38 +01:00
maxage : 7 # keep logs for 7 days
2021-12-29 07:31:19 +01:00
metrics :
2023-02-20 16:05:01 +01:00
prometheus : # optional, needs to be provided in the first config
2021-12-29 07:31:19 +01:00
endpoint : /metrics
2021-12-29 08:42:42 +01:00
listen_addr : ":6178" # default listens on port 6178 on all IPs.
2022-05-17 13:12:07 +02:00
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
2023-05-02 16:43:55 +02:00
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
2022-10-03 19:20:19 +02:00
---
# 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
2024-04-03 08:24:23 +02:00
# metrics configuration is always used from the first configuration