Skip to main content

Quick start

This page takes a Linux or macOS machine from nothing to a scheduled backup. On Windows, the steps are the same with the PowerShell commands in Install the worker.

1. Sign in and choose a plan​

Open the dashboard and sign in with GitHub. Then buy a plan on the Pricing page: without one, the dashboard refuses to link a machine, and the worker backs up only on a linked machine. See Plans and billing.

2. Install the worker​

The machine needs git. Then:

curl -fsSL https://holdfast-docs.mishrashardendu22.dev/install.sh | sh

This installs ~/.local/bin/github-backup-worker after checking its checksum, creates your settings file and adds an hourly job that waits until the machine is linked. When it says ~/.local/bin is not on your PATH, add the line it prints to your shell's profile and open a new terminal. Details: Install the worker.

In the dashboard, open Settings > Agents. The Link a machine card shows the command with your account's address filled in. Run it:

github-backup-worker link --control-plane <the address from the Agents page>

The worker prints a code such as BCDF-GHJK and opens the dashboard's Link a machine page. Check that the code matches and select Approve. From now on the hourly job follows your account's schedule.

4. Log in to GitHub​

gh auth login # skip if the GitHub CLI is already logged in
github-backup-worker login github --from-gh

This stores the GitHub CLI's login in your system keychain, so the worker can also read your private repositories. Other ways to give the worker access are in Install the worker.

5. Decide where backups go​

Open the settings file the installer created, ~/.config/github-backup/worker.env on Linux or ~/Library/Application Support/github-backup/worker.env on macOS. For backups into a folder on a disk, add:

BACKUP_SINK=local
BACKUP_LOCAL_DIR=/srv/backups/github

The folder must already exist. For an S3-compatible bucket, see Choose where backups go.

Then say which GitHub accounts to back up. Add your own login, and any organizations:

PROJECT_ACCOUNT=your-github-login
ORG_ACCOUNT=your-org,another-org

6. Run the first backup​

Preview what the first run will do, then run it. ENV_FILE tells the worker's commands where the settings are (on macOS, use the macOS path above):

export ENV_FILE="$HOME/.config/github-backup/worker.env"
github-backup-worker run --dry-run
github-backup-worker run

The dry run lists every repository and the estimated size, and changes nothing. The real run appears in the dashboard under Dashboard and Backups while it runs.

From now on the machine backs up on its own, about once a week. See Schedules and runs.

Next steps​