This is a tool to automatically backup git repos hosted on Bitbucket locally. The primary use case for this tool is to reduce clutter on Bitbucket.
The archiver has two options to specify the repos to archive.
- Archive all repos that are marked as archived on Bitbucket
- Provide a list of bitbucket projects to archive (All repos in the projects will be archived)
- Copy the
.env.example
file to.env
and fill in the values - Choose the mode of operation
-
Default: Archive all repos that are marked as archived on Bitbucket
docker run --env-file .env ghcr.io/ls1admin/bitbucket-archiver:latest
-
Project based archival:
- Create a file with the name
projects.txt
in the root of the project - Add the project names to the file, one per line
docker run --env-file .env -v $(pwd)/projects.txt:/app/projects.txt ghcr.io/ls1admin/bitbucket-archiver:latest --project-file projects.txt
Explanation
We need to explicitly provide the env file to the docker container. We also need to mount theprojects.txt
file to the container so that it can be read by the script. - Create a file with the name
-
- Copy the
.env.example
file to.env
and fill in the values - Choose the mode of operation
-
Default: Archive all repos that are marked as archived on Bitbucket
docker run --env-file .env ghcr.io/ls1admin/bitbucket-archiver:latest --execute-delete
-
Project based archival:
- Create a file with the name
projects.txt
in the root of the project - Add the project names to the file, one per line
docker run --env-file .env -v $(pwd)/projects.txt:/app/projects.txt ghcr.io/ls1admin/bitbucket-archiver:latest --project-file projects.txt --execute-delete
- Create a file with the name
-
Run app locally:
go run .