Sjors Holtrop
49e1a956ce
S3 dest: Tag backup objects with original repo's URL ( #377 )
...
* beginning of user tags implementation
* make s3 src URL tagging configurable
* fix formatting
* actually fix formatting
2026-04-16 07:11:36 +02:00
Andreas Wachter
e6999418e2
Fix linting ( #372 )
2026-04-05 21:39:20 +02:00
Gary Thomas
cfd1b6ea04
Implement azure blob destination with SAS url
2025-10-26 22:04:44 +00:00
Andreas Wachter
3f831c33b3
Revert "upgraded go-git to v6 ( #340 )"
...
This reverts commit 6f2bfc2419 .
2025-07-24 06:55:34 +02:00
Andreas Wachter
6f2bfc2419
upgraded go-git to v6 ( #340 )
2025-07-03 09:06:48 +02:00
Andreas Wachter
158bcc1b5c
switch from gopkg.in/yaml.v3 to github.com/goccy/go-yaml ( #330 )
...
* switch from https://github.com/go-yaml/yaml to https://github.com/goccy/go-yaml
* change to ubuntu latest
* update lint
2025-06-06 12:57:52 +02:00
yubazh and y.bazhenov
97c26eef7b
add backup creation date directory in s3 ( #320 )
...
* add backup creation date directory in s3
* fix var name
---------
Co-authored-by: y.bazhenov <y.bazhenov@arenadata.io >
2025-04-29 18:40:04 +02:00
Sjors Holtrop
533b98ba0c
Make S3 backups bare ( #316 )
2025-04-28 11:58:00 +02:00
Sjors Holtrop
36fd4fa6c0
Improve error output. Make empty-remote a warning instead of an error ( #310 )
2025-04-03 00:32:13 +09:00
Andreas Wachter
377378ce3a
add Apprise ( #309 )
...
* added apprise
* fixed yaml type, check for / at the end of url
* return error message
* adapted example config and gickup_spec
* re-format spec
* Revert "re-format spec"
This reverts commit b938a0587e .
* fix spec
2025-04-02 11:29:40 +02:00
Sjors Holtrop
00d278094a
add support for specifying storageclass for S3 dest ( #307 )
2025-04-01 08:13:42 +02:00
Andreas Wachter
69ddf8b24a
the token for s3 is not always needed, for example in minio ( #306 )
2025-03-26 09:13:46 +01:00
Sjors Holtrop
6be0214ee3
add zip support for s3 destination ( #304 )
2025-03-25 19:16:01 +01:00
sjorsholtrop-ritense
57a38a4d8f
Fix bitbucket source, add temp token support to s3 dest ( #302 )
2025-03-23 15:05:12 +01:00
Andreas Wachter
976b457a5c
added exit code when an error occured ( #289 )
2025-01-05 08:52:11 +01:00
Andreas Wachter
3cd914a4e1
Add s3 ( #259 )
...
* added s3 add destination
* read environment variables for s3 buckets
* adapted example config
* added debug message
* added s3 add destination
* read environment variables for s3 buckets
* adapted example config
* added debug message
2024-08-26 13:46:16 +02:00
Andreas Wachter
0e76cf9481
enable push to gitlab ( #233 )
2024-04-16 13:34:05 +02:00
Andreas Wachter
6a293dd625
implemented mirror using gickup and not giteas mirror function ( #225 )
...
* implemented mirror using gickup and not giteas mirror function
* added "mirror" to gogs
* push to gogs
* mirror is now a struct
* move deprecation notice, no need to spam
2024-04-15 07:10:49 +02:00
Andreas Wachter
61d5070f50
fixed some backup path issues and reload issues ( #220 )
...
* fixed some backup path issues and reload issues
* removed all chdirs
2024-04-04 07:31:28 +02:00
Andreas Wachter
54feabae23
check if config is null ( #223 )
2024-04-03 16:32:55 +02:00
Andreas Wachter
dca5a55a8a
add cron to all files if necessary ( #211 )
2024-02-27 07:01:04 +01:00
Andreas Wachter
8de9d0f16f
added git lfs for mirrors ( #204 )
...
* added git lfs for mirrors
* added openssh-client to ubuntu image
* working push on all branches
* fetch after clone and before pull to get all branches
* checkout all branches is not needed
* fix fetch
2024-02-19 08:42:35 +01:00
Andreas Wachter
76bcf763aa
Issue 200 ( #203 )
...
* force fetch
* do not fetch
* log push
* log clone too
2024-01-29 12:31:36 +01:00
Andreas Wachter
acbb331450
get gitlab user ( #201 )
2024-01-25 07:40:36 +01:00
Andreas Wachter
d1568d4545
Reload config ( #199 )
...
* reload on config changes
* handle prometheus metrics
* compare config structs
* create seperate object for logging
2024-01-09 14:43:51 +01:00
Andreas Wachter
a70f9c939f
Revert "Reload config ( #196 )" ( #198 )
...
This reverts commit 61cac5dda6 .
2024-01-09 14:33:28 +01:00
Andreas Wachter
61cac5dda6
Reload config ( #196 )
...
* reload on config changes
* handle prometheus metrics
* compare config structs
2024-01-04 12:54:12 +01:00
Andreas Wachter
fecb4040e6
added sublogger to gitea ( #178 )
...
* added sublogger to gitea
* implemented the rest of the subloggers
2023-10-04 10:55:24 +02:00
Andreas Wachter
f8ad43bb29
Multiple branches ( #165 )
...
* added github mirror functionality
* create temporary directory to clone into
* added onedev as destination
* added sourcehut
* add new examples
* added push of all branches, autocreation of repos on sourcehut
* push everything
* sourcehut visibility fix
2023-08-16 14:04:59 +02:00
Andreas Wachter
f468f48ba1
mirror functions ( #164 )
...
* added github mirror functionality
* create temporary directory to clone into
* added onedev as destination
* added sourcehut
* add new examples
2023-08-15 18:13:21 +02:00
Andreas Wachter
2e75d80540
Push notification not on all runs ( #152 )
...
* added gotify and ntfy to notify
* added new example config
* use push config in all configs
2023-05-16 09:39:46 +02:00
Andreas Wachter
b2da20028e
added gotify and ntfy to notify ( #147 )
2023-05-02 16:40:56 +02:00
Andreas Wachter
3009366b05
set warning if no destinations are configured
2023-03-03 07:26:35 +01:00
Andreas Wachter
3d125133ef
implement filters for github ( #137 )
...
* implement filters for github
* add filter to exclude archived repositories
* add filter for gitea/forgejo
* gogs filter option
* fix error log
* include gitlab filters
* fix logging
* parse duration
* filters for onedev and sourcehut
* adapted conf.example.yml
2023-02-20 16:05:01 +01:00
Andreas Wachter
f61574bf9c
improved prometheus metrics ( #134 )
...
* improved prometheus metrics
* change RepoTime to gauge
* fix gitea, only set metrics if ran
2023-02-10 06:07:11 +01:00
Andreas Wachter
2ec9d55f82
added visibility, new create org options and wiki support ( #128 )
...
* added visibility, new create org options and wiki support
* added gogs
* log error instead of fatal
2022-12-09 15:45:13 +01:00
Andreas Wachter
fa2dfd4434
Sourcehut ( #123 )
...
* added createorg to gogs
* added sourcehut capabilities
* fix variable names
* added sourcehut to readme
2022-11-16 08:09:33 +01:00
Andreas Wachter
527e740ed7
check if config is nil ( #118 )
2022-10-18 10:34:11 +02:00
Andreas Wachter
041a5a88b7
handle multiple configs ( #114 )
...
* handle multiple configs
* upgrade golangci_lint_version
* SnakeCase and replaces ioutil with os
2022-10-03 19:20:19 +02:00
Andreas Wachter
6461754630
added onedev functionality ( #111 )
...
* added onedev functionality
* go mod tidy
2022-08-11 21:31:03 +02:00
Andreas Wachter
3ae5a3a463
backup any repo ( #110 )
...
* added any module
* update dependencies
* clone local repos too
* fixed the separator and adjusted example config and README.md
* go mod tidy
* ran gofumpt and goimports
* cleaned up a bit and implemented timeformat as environment variable
2022-07-18 13:59:20 +02:00
510e234e52
feat: Support multiple heartbeat URLs ( #109 )
...
* feat: add heartbeat metrics
* feat: Support multiple heartbeat URLs
#100 introduced heartbeat support but only supported one URL. This PR was closed, however I've re-introduced this feature and added support for multiple heartbeat URLs as discussed in the #100 discussion.
This also resolves #108 which is a feature request for the heartbeat feature.
* fix: When sending the heartbeat fails, log an error but don't crash the program
This prevents problems with external services from causing the program to quit.
Co-authored-by: Matthew Toohey <contact@mtoohey.com >
Co-authored-by: Jordan Crawford <>
2022-05-17 13:12:07 +02:00
Tom Moulard
646b792ac1
chore: add linting ( #101 )
...
* chore: adding makefile
* chore: adding lint
* chore: update package name
* lint: run with fix
* chore: update main.go
* chore: update main_test.go
* chore: update types.go
* chore: update logger.go
* chore: update types_test.go
* chore: update prometheus.go
* chore: update local.go
* chore: update gitlab.go
* chore: update gogs.go
* chore: update bitbucket.go
* chore: update gitea.go
* chore: update github.go
* chore: update main*.go
* chore: go mod tidy
* chore: update action to have a correct working-directory
2022-03-20 11:25:11 +01:00
Andreas Wachter
70ddbc829c
updated dependencies
2022-02-22 08:15:54 +01:00
Andreas Wachter
d52d7cc8be
fixed the prometheus dependency for cron
2022-01-03 07:07:10 +01:00
Andreas Wachter
9e175cf41b
duration as string
2021-12-30 16:00:19 +01:00
Colin Dean
d98ccdb454
Adds Prometheus metrics when in scheduled mode ( #62 )
...
* WIP: Adds InfluxDB2 metrics
* Adds basic Prometheus metrics
It's much easier to implement so I'm switching to focusing on it for
now.
* Add some more counters and gauges
Use some labeled counters for backup destinations
* Extract methods for local repo clone and update
It was a little difficult to understand what was going where, esp. with
Go's verbose logging, so I extracted methods where appropriate. This
should also ease some testing concerns down the road.
* Fixes missing y in yaml
* Refactor next run logging
* Add run start and end log messaging
* Adds prom histogram for job duration
* Adds a prom gauge for number of repos discovered
* Switch prom job duration to a summary
I'm really not sure if it should be a summary or a histogram, but
reading about both, it seems like it would be more valuable with
quantiles and not buckets, so summary it is.
* Drop InfluxDB integration for now
We can revert this if we decide to implement InfluxDB after all.
@cooperspencer prefers Prometheus and frankly it's a lot easier to set
up so I'll use it, too, since I already have it running in my
environment anyways!
2021-12-29 07:31:19 +01:00
Colin Dean
b471943f19
Set log level based on --quiet and --silent ( #72 )
...
* Adjusts --quiet to output only warn+ log messages
Fixes #51
* Adds a --silent option to suppress all log output
2021-12-29 07:29:30 +01:00
Andreas Wachter
19306748ac
implemented quiet into main
2021-12-25 16:37:33 +01:00
Colin Dean
c05e8c9329
Extracts tilde-in-home check and tests it ( #45 )
...
* Extract user home directory detection to a function
* Extracts tilde-in-path substitution and tests it
2021-12-17 06:37:43 +01:00