Skip to content
/ reaper Public
forked from LeslieLeung/reaper

REpository ArchivER(REAPER) is a tool to archive repositories from any Git servers.

License

Notifications You must be signed in to change notification settings

ws1993/reaper

 
 

Repository files navigation

REAPER

English | 简体中文

REpository ArchivER(REAPER) is a tool to archive repositories from any Git servers.

Features

Installation

curl -sSfL https://raw.githubusercontent.com/LeslieLeung/reaper/main/install.sh | sh -s -- -b /usr/local/bin

Or get from Release.

Usage

You have to create a configuration file to use REAPER.

repository:
  - name: reaper
    url: github.com/leslieleung/reaper
    cron: "0 * * * *"
    storage:
      - localFile
      - backblaze
    useCache: True

storage:
  - name: localFile
    type: file
    path: ./repo
  - name: backblaze
    type: s3
    endpoint: s3.us-west-000.backblazeb2.com
    region: us-west-000
    bucket: your-bucket-name
    accessKeyID: your-access-key-id
    secretAccessKey: your-secret-access-key

Then you can run REAPER with the configuration file.

reaper -c config.yaml
# or simply call reaper if your configuration file is named config.yaml
reaper

rip

rip archives a single repository defined in configuration.

reaper rip reaper

run

run archives all repositories defined in configuration.

reaper run

Combined with cron, you can archive repositories periodically.

daemon

daemon runs REAPER as a daemon. It will archive all repositories defined in configuration periodically.

reaper daemon
# You might want to run it with something like nohup
nohup reaper daemon &

Configuration

For configuration, you can check out this example.

For more details, see Configuration in wiki.

Storage

REAPER supports multiple storage types.

  • File
  • AWS S3

Run as docker container

Docker CLI

One-off run.

  • Change ${pwd}/config/example.config.yaml to your config file path.
  • Customize ${pwd}/repo:/repo to be your desired storage path. The in-container path needs to be the same as the path in config file.
docker run --rm \
    -v ${pwd}/config/example.config.yaml:/config.yaml \
    -v ${pwd}/repo:/repo \
    leslieleung/reaper:latest \
    run

Docker Compose

For example compose file, see docker-compose.yml.

docker compose up -d

FAQ

See FAQ.

Stargazers over time

Stargazers over time

About

REpository ArchivER(REAPER) is a tool to archive repositories from any Git servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 61.2%
  • Shell 37.2%
  • Dockerfile 1.3%
  • Makefile 0.3%