https://github.com/mishamyrt/rakun
🦝 Remote repositories synchronizer
https://github.com/mishamyrt/rakun
backup github gitlab nas
Last synced: 2 months ago
JSON representation
🦝 Remote repositories synchronizer
- Host: GitHub
- URL: https://github.com/mishamyrt/rakun
- Owner: mishamyrt
- License: gpl-3.0
- Created: 2022-05-09T08:48:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2026-05-02T19:59:48.000Z (5 months ago)
- Last Synced: 2026-05-02T20:28:59.624Z (5 months ago)
- Topics: backup, github, gitlab, nas
- Language: Go
- Homepage:
- Size: 148 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Rakun
Utility that downloads repositories from different services to local storage.
It was developed because of concerns about blocking my GitHub account.
The first time you run the utility, it creates one `tar.gz` archive per repository. On subsequent runs it compares remote HEAD commits, updates only changed repositories, and keeps an index in `.rakun-index.json`.
## Installation
### Brew (macOS)
```sh
brew install mishamyrt/tap/rakun
```
### From sources
```sh
go install github.com/mishamyrt/rakun@latest
```
## Configuration
The utility loads configuration from a yaml file.
The default is to check `rakun.config.yaml` in the current directory.
To specify a custom configuration path, run the utility with the `-c` flag.
```sh
rakun -c my_config.yaml
```
Use `-o` or `--output` to choose where archives will be written. If omitted, Rakun writes into the current working directory.
```sh
rakun -c config.yaml -o ./backups
```
Use `-j` or `-jobs` to control parallel repository processing. The default is `runtime.NumCPU()`.
```sh
rakun -c config.yaml -j 8
```
### Structure
```yaml
- domain: github.com
type: github
token: !env $GITHUB_TOKEN
namespaces:
mishamyrt:
skip: # Ignore list
- X01BD-kernel
- X01BD-device
Paulownia-Group:
repos:
- ghostty-org/ghostty
- domain: github.enterprise.local
type: github
token: ghp_your_enterprise_token
repos:
- platform/core
- domain: gitlab.com
type: gitlab
token: !env $GITLAB_TOKEN
namespaces:
platform/core:
skip:
- archived-project
- platform/core/tools/cli
repos:
- platform/core/api
```
Each top-level item describes one source host. For `type: github`, `namespaces` discovers every repository visible to the token for a given user or organization, and `repos` uses `owner/repo`.
For `type: gitlab`, `namespaces` uses a GitLab group path such as `platform/core`, discovers projects in that group and its subgroups, and excludes shared projects. `repos` uses the full project path such as `platform/core/api` or `platform/core/tools/cli`.
`token` may be either plain text or an environment reference:
```sh
export GITHUB_TOKEN=your_github_access_token
export GITLAB_TOKEN=your_gitlab_access_token
rakun -c config.yaml -o ./results
```
If a group uses `namespaces`, `token` is required.
If a group uses only explicit `repos`, `token` is optional and public repositories can be synchronized without it.
Each synchronized repository is stored as a full Git checkout inside an archive:
```text
///.tar.gz
```
## License
GPL-3.0