Files
gickup/README.md

147 lines
4.3 KiB
Markdown

<h1 align="center">
<img src="https://github.com/cooperspencer/gickup/blob/main/gickup.png" style="width: 20%;" alt="logo">
<br/>
GICKUP
</h1>
<h4 align="center">
Backup your Git repositories with ease.
</h4>
<p align="center">
<strong>
<a href="https://cooperspencer.github.io/gickup-documentation/" target="_blank">Website</a>
•
<a href="https://github.com/cooperspencer/gickup/">GitHub</a>
•
<a href="https://cooperspencer.github.io/gickup-documentation/" target="_blank">Docs</a>
</strong>
</p>
<p align="center">
<a href="https://github.com/cooperspencer/gickup/actions/workflows/docker.yml">
<img alt="Build and Publish" src="https://github.com/cooperspencer/gickup/actions/workflows/docker.yml/badge.svg">
</a>
</p>
## What is GICKUP?
Gickup is a tool that allows you to clone/mirror repositories from one host to another.
This is useful if you want to have a backup of your repositories on another host or on a local server.
### Supported Source and Destinations
You can clone/mirror repositories from:
- Github
- Gitlab
- Codeberg (Forgejo)
- Gitea
- Gogs
- Bitbucket
- OneDev
- Sourcehut
- Opengist
- Any
You can clone/mirror repositories to:
- Github
- Gitlab
- Codeberg (Forgejo)
- Gitea
- Gogs
- OneDev
- Sourcehut
- Radicle
- Local
- S3
If your hoster is not listed, feel free to open an issue and I will add it.
## How to make a configuration file
[Here is an example](https://github.com/cooperspencer/gickup/blob/main/conf.example.yml)
## How to run the binary version
`./gickup path-to-conf.yml`
## Start with the web interface
```bash
./gickup --webui :8080 /path/to/conf.yml
```
Open http://localhost:8080. If the file is missing or empty, the interface opens
configuration setup. Paste your YAML and save; Gickup creates the file and its
parent directory, then loads it within about five seconds. Without a cron schedule,
loading a configuration starts a backup. With a schedule, backups wait for that schedule.
The configuration path defaults to `conf.yml` in the working directory.
Pass the listen address directly to `--webui`, for example `--webui :8080`
or `--webui 127.0.0.1:9090`.
When `--webui` is supplied, this address takes precedence over `webui.addr` in YAML.
Without the flag, the existing YAML setting still works.
The interface has no authentication; restrict access to trusted users.
For Docker, mount a **directory** so the interface can create the configuration file:
```yaml
services:
gickup:
build: .
command: ["--webui", ":8080", "/config/conf.yml"]
ports:
- "127.0.0.1:8080:8080"
volumes:
- ./config:/config
- ./backups:/backups
```
Run `mkdir -p config backups` and `docker compose up --build`, then open
http://localhost:8080. The saved configuration persists in `./config/conf.yml`.
Use `/backups` as the local destination path to persist backups on the host.
## How to run the Docker image
```bash
mkdir gickup
wget https://raw.githubusercontent.com/cooperspencer/gickup/main/docker-compose.yml
nano conf.yml # Make your config here
docker-compose up
```
## Compile the binary version
`go build .`
## Compile the Docker Image
```bash
git clone https://github.com/cooperspencer/gickup.git
cd gickup
nano docker-compose.yml # Uncomment the Build
nano conf.yml # Make your config here
docker-compose build
docker-compose up
```
## Questions?
If anything is unclear or you have a great idea for the project, feel free to open a discussion about it.
https://github.com/cooperspencer/gickup/discussions
## Distribution Packages
|Distribution|Package|Maintainer|
|---|---|---|
|Arch|[gickup](https://aur.archlinux.org/packages/gickup/)|[me](https://github.com/cooperspencer)|
|Homebrew|[gickup](https://formulae.brew.sh/formula/gickup#default)||
|Fedora|[gickup](https://copr.fedorainfracloud.org/coprs/frostyx/gickup/)|[FrostyX](https://github.com/FrostyX)|
|Scoop|[gickup](https://scoop.sh/#/apps?q=gickup&id=493e856707843828b4491004edfb6ddedc4bd1e1)||
|Winget|[gickup](https://github.com/microsoft/winget-pkgs/tree/master/manifests/c/cooperspencer/gickup)||
## Issues
The mirroring to Gitlab doesn't work, or at least I can't test it properly because I have no access to a Gitlab EE instance.
## Future Ideas
- Additional VCS
- [GitBucket](https://gitbucket.github.io/)
- Add minio as a destination