scorpiox-vault-git🔨 build

Create offline backups of Git repositories with optional authentication and configurable archive formats. Ideal for disaster recovery, air-gapped environments, and automated backup pipelines.

🐧 Linux x64 🐧 Linux ARM64 🍎 macOS ARM64 🪟 Windows x64

⚙️ Flags & Options (5)

Flag Short Description Takes Value
--output -o Output directory or file path for the backup archive Yes
--help -h Display help information and usage No
--pat Personal access token for authenticating with private repositories Yes
--url URL of the Git repository to back up Yes
--format Archive format for the backup (e.g. tar.gz, zip, bundle) Yes

💡 Usage Examples

Basic repository backup
# Back up a public repository to the current directory
$ scorpiox-vault-git --url https://github.com/user/project.git
Cloning into bare repository...
Archiving to ./project-backup-2026-05-29.tar.gz
Done. 24.3 MB written.
Backup with custom output path
# Specify an output directory for the archive
$ scorpiox-vault-git --url https://github.com/org/repo.git \
    --output /backups/git/repo-2026-05-29
Archiving to /backups/git/repo-2026-05-29.tar.gz
Private repository with PAT authentication
# Authenticate with a personal access token for private repos
$ scorpiox-vault-git --url https://git.company.com/team/private-repo.git \
    --pat ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
    --output /vault/private-repo

# Using environment variable for the token (recommended)
$ scorpiox-vault-git --url https://git.company.com/team/repo.git \
    --pat "$GIT_BACKUP_TOKEN"
Choose archive format
# Create a zip archive instead of the default tar.gz
$ scorpiox-vault-git --url https://github.com/org/repo.git \
    --format zip -o /backups/repo

# Create a Git bundle (preserves full history, ideal for restoring)
$ scorpiox-vault-git --url https://github.com/org/repo.git \
    --format bundle -o /vault/repo.bundle
Automated backup pipeline (cron / CI)
# Daily backup script for multiple repositories
#!/bin/bash
DATE=$(date +%Y-%m-%d)
VAULT="/mnt/backup/git-vault/$DATE"
mkdir -p "$VAULT"

for repo in api-service web-frontend infra-config; do
  scorpiox-vault-git --url "https://git.internal/$repo.git" \
    --pat "$VAULT_TOKEN" \
    --format bundle \
    -o "$VAULT/$repo"
done
# Produces: /mnt/backup/git-vault/2026-05-29/api-service.bundle
# /mnt/backup/git-vault/2026-05-29/web-frontend.bundle
# /mnt/backup/git-vault/2026-05-29/infra-config.bundle
Restore from a bundle backup
# Restore a repository from a .bundle file
$ git clone /vault/repo.bundle restored-repo
$ cd restored-repo && git remote set-url origin https://git.company.com/team/repo.git
$ git fetch origin
Already up to date.

📦 Source & Build Info

Source File
scorpiox/scorpiox-vault-git.c
Lines of Code
413
Dependencies
None

🔗 Related Tools