-
Notifications
You must be signed in to change notification settings - Fork 0
Gbak
title: gbak type: tool created: 2026-05-22 last_updated: 2026-05-22 related: ["radar/techniques/PersonalBackupPipeline", "radar/platforms/CloudflarePages"] sources: ["https://github.com/charyan/gbak"] radar_quadrant: Tools radar_ring: Assess radar_position: inner
A minimal shell script that clones or pulls all GitHub repositories for a user or organisation into a local directory, suitable for scheduled backup via cron.
gbak authenticates to the GitHub API, paginates through all repositories for a given account, and clones any that do not exist locally or pulls the latest commits for those that do. It supports both SSH and HTTPS remotes and handles pagination for accounts with large numbers of repos.
A single cron entry — 0 2 * * * gbak — keeps the local mirror current without manual intervention.
GitHub repositories are not inherently durable from the user's perspective. Accounts can be suspended, repositories accidentally deleted, and the platform itself has experienced outages. A local backup costs one disk allocation and one scheduled job. gbak removes the manual work of tracking which repos exist and remembering to clone new ones as they are created.
| Tool | Scope | Complexity |
|---|---|---|
gh repo list + shell loop |
Code only | DIY per-project |
| gbak | Code only | Single script, minimal config |
| github-backup | Code + issues + PRs + wikis | Python, more dependencies |
| Gitea/Forgejo mirroring | Full Git server mirror | Significant infrastructure |
gbak occupies the minimal end of the spectrum: no dependencies beyond curl and git, no database, no web UI.
gbak is one component of a broader radar/techniques/PersonalBackupPipeline. Source code repositories represent a distinct backup domain — versioned, large, and structured differently from documents or media. A complete personal backup strategy treats code repos as a separate tier with their own tooling.
gbak sits in the Assess ring of the Tools quadrant, at inner position. First studied via the charyan/gbak repository (2024-01-13). The use case is clear and the tool is intentionally minimal. Assess gate: run gbak on a cron schedule and verify at least one repository restores cleanly from the local copy. Trial gate requires confirmed end-to-end restore, not just successful cloning.