| Crates.io | gitbackup |
| lib.rs | gitbackup |
| version | 0.2.5 |
| created_at | 2024-12-28 14:55:14.130076+00 |
| updated_at | 2025-05-19 17:43:04.646543+00 |
| description | Backup all your git repositories with a single command |
| homepage | |
| repository | https://codeberg.org/adriantombu/gitbackup |
| max_upload_size | |
| id | 1497551 |
| size | 70,136 |
Backup all your Git (Gitea, Forgejo, GitLab, GitHub) repositories with a single command.
cargo install gitbackup && gitbackup init
You can retrieve the config file location with the config command. The file is constructed with the following
structure:
backup_path = "gitarchive"
[[providers]]
provider = "github"
host = "github.com"
exclude = ["facebook/react", "^google/"]
username = "MY_USERNAME"
token = "MY_GITHUB_TOKEN"
[[providers]]
provider = "gitlab"
host = "gitlab.com"
exclude = []
username = "MY_USERNAME"
token = "MY_GITLAB_TOKEN"
[[providers]]
provider = "forgejo"
host = "codeberg.org"
exclude = []
username = "MY_USERNAME"
token = "MY_FORGEJO_TOKEN"
The backup_path field is the path where the repositories will be stored related to the user directory.
The providers field is a list of providers to backup. Each provider has the following fields:
provider: the provider of the repository (github, gitea, forgejo, gitlab are supported)host: the host of the repository (e.g.: github.com, gitlab.com, codeberg.org, ... )exclude: a list of repositories to exclude from the backup seperated by a comma (we can also use a regex)username: your usernametoken: your token~ gitbackup help
gitbackup 0.1.0
Adrian Tombu <adrian@otso.fr>
Backup all your git repositories with a single command
Usage: gitbackup <COMMAND>
Commands:
init Initialize the config file
config Display the config file contents
run Run the backup
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
There can be many instances of Gitea / Forgejo so here we will use Codeberg as an example.