Description
git-backup is a command-line tool that pulls copies of all your GitHub and GitLab repositories to a folder, for backup. It is a standalone program, so you do not need to install git on the machine that runs it. You describe which accounts and repositories to back up in a git-backup.yml configuration file. The file supports Go templating, so secrets and other values can be loaded from environment variables instead of being written into the file. You can run it directly from the command line, or in a Docker container, where you mount a folder that holds the configuration file and the backups. The container accepts environment variables for the timezone used in logs, and for the user and group IDs that will own the backup files. The latest version is available from the releases page. The project is aimed at keeping offline copies of code hosted on those services.…
Highlights
- Backs up all GitHub and GitLab repositories
- No git installation required
- Configuration file with environment variable templating
- Command-line and Docker usage
- Backup owner and timezone options in Docker
Ratings & Reviews
No ratings yet
Be the first to rate Git Backup.
People also visit
Gitea Mirror
Gitea Mirror auto-syncs GitHub repos to your self-hosted Gitea/Forgejo
Git Backup FAQ
What does git-backup do?
It pulls copies of all your GitHub and GitLab repositories into a folder for backup.
Do I need git installed?
No. The README says the tool is completely stand-alone and does not require git to be installed.
How do I configure it?
Create a git-backup.yml file. It supports Go templating so you can load secrets from environment variables.
Can I run it in Docker?
Yes. Mount the folder with your configuration and backups, and set TZ, PUID and PGID to control logs and file ownership.
What are the best Git Backup alternatives?
Popular alternatives to Git Backup include GitSave, Mirror To Gitea and Gitea Mirror. See all Git Backup alternatives


