Skip to content

Add GitHub integration recipe (community)#82

Open
tienou wants to merge 2 commits into
PlakarKorp:mainfrom
tienou:add-github-integration
Open

Add GitHub integration recipe (community)#82
tienou wants to merge 2 commits into
PlakarKorp:mainfrom
tienou:add-github-integration

Conversation

@tienou

@tienou tienou commented Jul 13, 2026

Copy link
Copy Markdown

What

This PR adds a recipe for a new community integration: github — a source connector that backs up all repositories of a GitHub organization or user (or a single repository) as bare git mirrors, i.e. the full history with every branch, tag and ref, plus a JSON dump of each repository's API metadata.

Integration repository: https://github.com/tienou/integration-github (ISC, tagged v0.1.0)

Why

Plakar has connectors for databases, mailboxes, object stores, Notion… but nothing yet for git forges, while « back up our GitHub org » is a very common need (ransomware/offboarding/compliance). This fills that gap with an org-wide, incremental, agent-less approach.

Design highlights

  • github://<org> or github://<org>/<repo> locations; config keys: token (falls back to $GITHUB_TOKEN), api_url (GitHub Enterprise Server support), cache_dir (persistent mirror cache → only new git objects are fetched on subsequent runs), include_forks, include_archived, metadata
  • Pure Go via go-git — no git binary needed at runtime, CGO-free static build
  • Built against go-kloset-sdk v1.1.0 / kloset v1.1.0 (plugin API v1.1.0), tested on plakar v1.1.4
  • Since plakar spawns two importer instances per backup (scan + content passes), mirror updates are serialized with a per-repository file lock so both instances share the cache safely; go-git transient files (tmp_pack_*, *.lock) are excluded from snapshots
  • Restore = plakar restore then git push --mirror
  • Tested end to end: org-wide backups (12 repos), incremental re-runs, restore verified with git fsck --strict on every mirror

Notes

  • checksum uses the same placeholder value as the other community recipes — happy to provide a real sha256 if you tell me what it should cover.
  • If you'd rather host this in the PlakarKorp/integrations monorepo, I'm happy to send it there instead — just tell me the preferred contribution path.
  • Roadmap: optional issues/PRs/releases dumps, and an exporter to push mirrors back to GitHub directly.

🤖 Generated with Claude Code

@tienou

tienou commented Jul 13, 2026

Copy link
Copy Markdown
Author

Bumped the recipe to v0.2.0, which adds GitHub App authentication (app_id + private key → auto-refreshed installation tokens): org-owned, read-only, non-expiring credentials instead of personal PATs — the way commercial GitHub backup products authenticate. PAT and anonymous access unchanged. Details in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant