English | 简体中文
REpository ArchivER(REAPER) is a tool to archive repositories from any Git servers.
- 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)
curl -sSfL https://raw.githubusercontent.com/LeslieLeung/reaper/main/install.sh | sh -s -- -b /usr/local/bin
Or get from Release.
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
archives a single repository defined in configuration.
reaper rip reaper
run
archives all repositories defined in configuration.
reaper run
Combined with cron, you can archive repositories periodically.
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 &
For configuration, you can check out this example.
For more details, see Configuration in wiki.
REAPER supports multiple storage types.
- File
- AWS S3
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
For example compose file, see docker-compose.yml.
docker compose up -d
See FAQ.