reaper icon indicating copy to clipboard operation
reaper copied to clipboard

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

REAPER

English | 简体中文

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

  • Features
  • Installation
  • Usage
    • rip
    • run
    • bury
    • daemon
  • Configuration
  • Storage
  • Run as docker container
    • Docker CLI
    • Docker Compose

Features

  • Archive repositories from any Git servers
  • Archive repositories of a user/an organization (see Configuration)
  • Cron support
  • Multiple storage types (see Storage)
  • Docker support (see Run as docker container)

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.

bury

bury archives all release assets of a repository.

reaper bury reaper

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.

  • [x] File
  • [x] 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