Troubleshooting
Start with these commands on the machine. They show the version, the stored logins, whether runs are linked and when the schedule runs next:
github-backup-worker version
github-backup-worker auth status
systemctl --user list-timers github-backup.timer # Linux with systemd
The hourly job's logs are in journalctl --user -u github-backup on Linux with systemd, ~/.local/state/github-backup/worker.log with cron, ~/Library/Logs/github-backup/worker.log on macOS and %LOCALAPPDATA%\github-backup\state\worker.log on Windows.
Setup and schedule
| Problem | Fix |
|---|---|
The installer stops with checksum mismatch | The download was damaged or changed on the way, and nothing was installed. Run it again. |
github-backup-worker: command not found | ~/.local/bin is not on your PATH. Add the line install.sh printed to your shell's profile, or run ~/.local/bin/github-backup-worker. |
curl: (60) SSL certificate problem with a local network address | The server's certificate comes from the server itself. Use the commands for a server on your local network. |
The worker fails with certificate signed by unknown authority and warns that it ignores SSL_CERT_FILE or SSL_CERT_DIR | The worker trusts only the system's certificate store. Add the authority's certificate to that store (for a server on your local network, the person who runs it has the commands) and remove the variable from your settings. |
| The worker cannot reach the service on a network where only a proxy reaches the internet | The worker connects to the service directly and does not use HTTPS_PROXY or HTTP_PROXY for it. Allow direct HTTPS from this machine to the service's address. |
| The timer never runs while you are logged out (Linux) | Lingering is off: run sudo loginctl enable-linger $USER. |
A command you run says no backup destination, or starts from scratch | It did not read your settings. Set ENV_FILE to your settings file first. |
The hourly job logs not linked to an account yet | Link the machine. |
A scheduled run fails with read the agent token of ..., followed by from the OS keychain | The machine is linked, but the keychain that holds the link's token was locked when the run started, usually on Linux after a reboot while nobody is logged in. Run the link command again with --store file. |
GitHub access
| Problem | Fix |
|---|---|
nothing to back up | No account is named and no GitHub App login is stored. Set PROJECT_ACCOUNT or ORG_ACCOUNT in worker.env, or log in with a GitHub App (see Install the worker). |
A scheduled run fails with read github:source from the OS keychain | The keychain was locked when the run started, usually after a reboot. Log in again with github-backup-worker login github --from-gh --store file (or without --from-gh for an app login). |
the GitHub App is not installed on any account this login can access | Install your app on the accounts to back up, or set GITHUB_DISCOVERY=accounts and name them in worker.env. |
device_flow_disabled | Tick Enable Device Flow in your GitHub App's settings. |
no GitHub App client id | Run github-backup-worker github-app create first, or log in with github-backup-worker login github --from-gh. |
bad_refresh_token or expired on | The GitHub login was revoked or not used for about six months. Run github-backup-worker login github again. |
Private repositories are withheld | The destination is a git repository that no stored login can confirm is private. Use a folder or a bucket, or make the destination private and readable by your login. |
| SSH clones or pushes fail only when scheduled | Scheduled runs have no SSH agent. Use HTTPS with a stored login, or a key without a passphrase used only for backups. |
Linking and the dashboard
| Problem | Fix |
|---|---|
this worker backs up only when linked to your account | The machine is not linked. Link it, then run the backup again. |
GHB_CONTROL_PLANE_URL is ..., but this machine is not linked to it | worker.env names a service this machine is not linked to. Run the link command with that address, or remove GHB_CONTROL_PLANE_URL from worker.env. Until then the worker backs up nothing. |
this machine is linked to ... and ...; set GHB_CONTROL_PLANE_URL to the one to report to | The machine is linked to more than one service. Add GHB_CONTROL_PLANE_URL=<address> to worker.env with the one to use, or unlink the others with github-backup-worker unlink --control-plane <address>. |
DATABASE_URL (or POSTGRES_URL) is set, but this is the customer build of the worker | The worker from this site works only through your account, never with a database of your own. Remove the DATABASE_URL and POSTGRES_URL lines from worker.env, and unset them in your shell if you set them there. |
the control plane does not accept this machine's agent token | The machine was revoked in the dashboard, or the account was deleted. Link it again. |
| The run exits saying the account has no paid plan | Every backup needs a paid plan. Renew it, and the next run continues. |
this worker build carries no run-pass keys | This copy of the worker cannot check run passes, so it backs up nothing. Tell the person who runs the service; once they have fixed the site's downloads, run the install command again. |
the control plane issued no run pass | The service did not sign a pass for the run. Tell the person who runs the service. Once they have restored its keys, the next run works with nothing to change on your machine; if they had to make new keys, run the install command again. |
the run pass is from ..., another address than ... | The machine is linked by an address the service does not name itself by, such as a LAN IP instead of its domain. Link it again with the address on the dashboard's Settings > Agents page: github-backup-worker link --control-plane <address>. |
the run pass is not valid for this worker | The worker came from the site of another service, or this service has changed its keys. Run the install command from the site of the service the machine is linked to; your settings, logins and link stay. |
A run exits with did not reach the control plane | The backup is stored, but the dashboard could not be reached for more than 2 minutes when the results were sent, so it shows the run as incomplete. The next run reports normally. |
another machine is running a backup | Another linked machine of your account is backing up. This run stops and counts as a success. |
| A run does not appear in the dashboard | Check that auth status says Runs: linked to .... A machine that is not linked backs up nothing. |
Storage
| Problem | Fix |
|---|---|
The run fails because BACKUP_LOCAL_DIR does not exist | Mount the backup disk, or create the folder. The worker never creates it, so an unmounted disk cannot fill your system disk. |
| A warning that bucket versioning is off | Turn versioning on in your bucket, so earlier archives are kept. The run continues without it. |
A repository is too_large | It is over the 100 MiB file limit of a git destination. Switch to a folder or a bucket. |
The run finishes with a damaged archive (archive_damaged) | The worker found a stored archive that no longer matches its checksum and backed it up again. Check the disk or bucket for errors. |
| A run reports that GitHub still has a repository the listing left out | A listing came back incomplete, or the repository left the accounts you named. The archive is kept. Check the GitHub login's access and the accounts in worker.env. |
Exit codes
A run exits with 0 when it succeeded, 1 when it failed or finished with problems (everything else is still stored and recorded; see the log), and 2 for a command it did not understand.