Commit Graph
55 Commits
Author SHA1 Message Date
Andreas Wachter 64e81c3b14 added lfs to s3 (#437) 2026-09-11 13:27:53 +02:00
Danny Sauer 55882ef63e fix(github): use App installation token for destination pushes (#433)
Pass the resolved destination credential through GetOrCreate to the push helper. Cover App and configured tokens on github.com and Enterprise Server, API failures, and the backup call chain.
2026-09-09 18:34:52 +02:00
Andreas Wachter 97c0b60a0c add failure heartbeats and status-aware notifications (#431) 2026-09-09 18:06:21 +02:00
Ben Burwood 11eb3ff76b Implement OpenGist Source (#430)
* Implement OpenGist Source

* Fix Lint Issues

* Fix gitlab test lint error

* global gickup UserAgent

* Fix package name lint

* fix go package name
2026-09-09 18:05:42 +02:00
gdm257 9fc59f0c48 Support WebDAV destination (#359)
* feat(destination): add WebDAV destination

Add a stdlib-only WebDAV destination mirroring the s3/azureblob flow:
bare-clone into a temp dir, optional zip, upload via HTTP PUT with Basic
auth, and prune stale remote files via PROPFIND/DELETE.

- types: WebDAVRepo struct, Destination.WebDAV field, Count()
- webdav: new package (UploadDirToWebDAV, DeleteObjectsNotInRepo)
- main: dispatch loop on par with azureblob
- conf.example.yml + gickup_spec.json: document the new destination

* feat: auto retry


Auto retry network errors and some situations.

Servers that disable Depth: infinity (Sabre/DAV, Nextcloud and others
answer 400/403/501) failed listing and could not prune stale files.
Try infinity once, fall back to recursive PROPFIND walk on rejection.

* refactor: use gowebdav client

Classify retry errors and make backoff interruptible.
2026-08-18 19:54:39 +02:00
Yorgos SaslisandAndreas Wachter 66eaf7bd2c Adds Radicle destination (#413)
* Adds Radicle destination

This destination allows mirroring repositories into the storage of a local
[Radicle](https://radicle.network) node.

Requires `git` + Radicle Command Line Interface (CLI) tools installed,
i.e. `rad` and `git-remote-rad` binaries. See https://radicle.network/install .

The repository is initialized with `rad init` on the first run and pushed
through the `git-remote-rad` helper afterwards, so the refs are signed with
the key of the Radicle profile.

Because every backup run works on a fresh temporary clone, each run has to
find the Repository ID (RID) created for an upstream on an earlier run:
every mirror records its upstream URL in a "dev.gickup" extension of the
signed Radicle identity document `payload`, and the storage is scanned for a
repository whose recorded source matches and whose refs are signed by this
profile's key — comparable to the existence lookups the forge destinations
make against their APIs, just against local storage. (Local-first, For The Win!)

Unlike other forge destinations we cannot use go-git for pushing,
because Radicle repositories are only reachable through the `git-remote-rad`
remote helper, which go-git does not support. All storage-touching
operations therefore shell out to the system `git` and `rad` binaries, so
identity creation and signed-refs handling stay inside the Radicle tooling.

Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>

* fixup! Adds Radicle destination

Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>

* fixup! Adds Radicle destination

Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>

---------

Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>
Co-authored-by: Andreas Wachter <andreas.wachter@buddyspencer.monster>
2026-07-29 15:41:13 +02:00
Michael HerberthandMichael Herberth dfee42bf30 Add configurable GitHub Enterprise URL support (#411)
Co-authored-by: Michael Herberth <michael.herberth@sarstedt.com>
2026-07-24 20:54:45 +02:00
Andreas Wachter e585cdea3e updated documentation (#405) 2026-06-22 10:59:37 +02:00
Bernat MutandAndreas Wachter d5caefb310 Feature/discussion 391 add GitHub app support (#396)
* feat: Add GitHub App support for authentication in configuration and code

* feat: Enhance GitHub App support by updating repository fetching logic and authentication method

* test: Update dependencies, enhance configuration handling, and add GitHub client tests

- Updated dependencies in go.sum to latest versions for improved stability and security.
- Added a defer statement to close the configuration file in readConfigFile function to prevent resource leaks.
- Implemented unit tests for GenRepo's HasAppAuth method to validate authentication conditions.
- Created new tests for the GitHub client to verify behavior with and without authentication tokens, including handling of invalid and missing private key files.

* feat: Exclude G101 gosec warning for github/github_test.go

* fixed go.mod and go.sum

---------

Co-authored-by: Andreas Wachter <andreas.wachter@buddyspencer.monster>
2026-06-16 14:12:59 +02:00
Bernat Mut fa7816143d feat: Add support for S3 AWS Credentials Chain (#394)
* feat: Add support for S3 static credentials configuration

- Updated S3Repo struct to include UseStaticCreds field
- Refactored credential retrieval logic in UploadDirToS3 and DeleteObjectsNotInRepo functions
- Added tests for S3Repo and credential retrieval functions

* docs: add changes for use_static_creds

* fix: lint issues

* fix: exclude gosec sanitized file path
2026-06-02 21:10:28 +02:00
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 036923b810 added email header to ntfy (#376) 2026-04-09 07:30:36 +02:00
Andreas Wachter e6999418e2 Fix linting (#372) 2026-04-05 21:39:20 +02:00
Gary Thomas 3e91ae4270 Update conf.example.yml for azure blob storage 2025-11-09 19:46:37 +00:00
yubazhandy.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
Aleksey @soar Smyrnov eadd2f7347 feat(local): Add mirror mode (#308)
* feat(local): Add mirror mode

* fix: Add `.git` to the mirror repos too
2025-04-05 20:30:31 +02: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
Sjors Holtrop 6be0214ee3 add zip support for s3 destination (#304) 2025-03-25 19:16:01 +01:00
Socheat Sok 6d2f8250b7 Add json schema support (#287) 2025-01-04 14:56:14 +01:00
Andreas Wachter dea1d8cac2 added cloning of gists (#274) 2024-09-28 15:48:20 +02: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 bd8df63dce fixed token and user, get repositories from workspaces too (Bitbucket) (#257)
* fixed token and user, get repositories from workspaces too

* tidied go.mod and go.sum

* don't look up workspaces if token is empty

* add token_file to bitbucket

* adjusted conf.example.yml
2024-08-26 11:10:10 +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 bf58b23155 configure a user to clone to. for structured cloning (#219) 2024-04-03 08:24:23 +02:00
Andreas Wachter 52a834b42b backup issues from github (#185)
* backup issues from github

* gitlab issues

* added gitea

* added gogs

* added onedev

* updated examples

* added more documentation
2023-12-01 07:58:53 +01:00
Andreas Wachter f03be6607f Gitea lfs (#177)
* variable mirror interval

* added LFS switch for gitea
2023-10-04 08:09:42 +02:00
Andreas Wachter 604d18d4ab added interval (#174) 2023-10-03 08:25:40 +02:00
Andreas Wachter 082821bfb9 added force push (#172) 2023-09-29 17:10:06 +02:00
Andreas Wachter 77024fb0a5 implemented backup to organization (#169)
* implemented backup to organization

* go mod tidy

* update lint
2023-09-29 12:26:03 +02:00
Andreas Wachter 03bfdc197d update example and readme 2023-08-17 08:32:45 +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 beae85c182 implemented git lfs (#160)
* implemented git lfs

* removed arm/v6 from docker builds

* add lfs to example
2023-07-18 10:56:43 +02:00
Andreas Wachter 64a67254e6 implemented exclude forks (#155) 2023-06-04 08:30:02 +02:00
Andreas Wachter fae97c289b Push (#148)
* added gotify and ntfy to notify

* added new example config
2023-05-02 16:43:55 +02: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 12d496dba7 added option to clone the repository as bare (#131) 2023-01-11 11:00:48 +01:00
Andreas Wachter 6ddf340744 added possibility to add date to path (#130)
* added possibility to add date to path

* adds zip functionality

* added keep parameter

* cleanup

* keep parameter creates files with the timestamp in repo name directory

* fixed clone with keep without structured=true

* remove search
2023-01-08 20:22:07 +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 99ad5cc1b6 added option to mirror to specific org or user in gitea and gogs 2022-10-11 08:45:05 +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
Matthew Toohey b0cd28c761 feat: backup starred repos (#89)
* feat: github starred support

* feat: gitea starred support

* fix: increment gitlab request pages properly

* feat: gitlab starred support
2022-02-22 07:42:05 +01:00
Adam Hintz 025b354278 Documentation: add information about cron / timezone and saving to Docker volume locally (#88) 2022-02-07 08:18:36 +01:00
Andreas Wachter dae3869f7d added includeorgs to the example config 2022-01-29 15:44:42 +01:00