Backup to Git
VegaStack can snapshot a workspace's pages, folders, templates, and attachments to a private GitHub repository on a schedule. This is useful both as a backup and as a git-friendly mirror for tooling that prefers files on disk.
What gets captured
- Every non-deleted page's source and metadata.
- Every folder with its slug path and parent.
- Every template's source and metadata.
- Every attachment (by reference) with its checksum.
Soft-deleted content is excluded by default.
Configuration
In Settings → Connections → Workspace, find the GitHub tile and click Connect GitHub. The flow:
- The Worker mints a signed state cookie.
- Redirects to the GitHub App install URL.
- After approval, GitHub redirects back to
/api/integrations/github/callback. - The callback verifies the signed state and stores the installation reference.
The Worker never stores a user OAuth token — only the GitHub App installation ID. That installation has the minimum scope needed to push backup commits.
Scheduled sync
The Worker scheduled() handler enqueues a github_backup job idempotent by (workspace_id, hour). The runner walks the workspace and writes a snapshot payload to the object store. When a real GitHub upload executor is configured, the payload is pushed as a commit to the configured repository.
Sync now
The tile has a Sync now action that enqueues the same job out-of-band. Two Sync now clicks in the same hour collapse to one job because of the hourly idempotency key.
States
The tile shows one of: not configured, not connected, connected, queued, running, succeeded, snapshot-only (executor missing — snapshot captured to object store but not delivered to GitHub), or failed.
Disconnect
Disconnect clears the installation reference and revokes future scheduled syncs. Already-captured snapshots remain in the object store until purged manually.