Install BackupBinder on this machine.

Build the program, check that the tools are present, take a first backup, then run test_restore into an empty scratch folder. That inventory check is how you know the archive is usable.

Get started

  1. Build the binary (below).
  2. Run doctor so restic is found.
  3. Take a first backup.
  4. Check it with test_restore into an empty scratch folder — never the live site. For archive integrity without extracting, see Check.

Build

You need Go to compile the program. The backupbinder binary does not download restic by itself — put restic on PATH, under .tools/, or set BACKUPBINDER_RESTIC. In this repository checkout, ./run setup (or ./run deps) can download restic into .tools/ and build the binary for you.

From a checkout of the repository:

git clone https://github.com/mikeybeck/BackupBinder.git
cd BackupBinder
./run setup
# or: go build -o bin/backupbinder ./cmd/backupbinder

The examples below assume you are in that directory and the binary is bin/backupbinder.

Where the data goes

Runs, the registry, site files, and secrets live in one data directory. In this checkout that directory is var/. Pass --home, or set BACKUPBINDER_HOME, to put it somewhere else.

Leave var/ and .tools/ out of git. var/secrets/ holds the restic password and destination credentials, mode 0600.

Restic

Restic is a separate program. BackupBinder looks for it in this order:

  1. BACKUPBINDER_RESTIC, when that variable is set. The path has to be a file.
  2. .tools/restic in this checkout, when that file exists.
  3. restic on PATH.

A backup needs restic. The other tools below are for particular kinds of copy.

Rclone, rsync, and ssh

Google Drive uses rclone. The lookup is the same shape: BACKUPBINDER_RCLONE if set, then .tools/rclone, then rclone on PATH. A local backup, and copies to SFTP, disk, S3, or B2, do not need rclone.

A site that lives on a server is copied here with rsync over SSH, then archived. Those two programs come from the system. SFTP uses the SSH keys already on this machine. There is no field for an SSH password.

See what this machine has

doctor prints the data directory, whether restic, rclone, rsync, ssh, mysqldump, and wp were found, an MCP config, and the cron line you would install yourself. It runs when restic is missing. It does not install anything. A backup needs restic (ready). Live WordPress dumps also need wp or mysqldump; the shipped fixture uses a database.sql file instead.

./bin/backupbinder doctor

The backup path is ready when restic is found. mcp does not start until then. The cron line in the report is text for you to install. doctor does not add it to crontab.

Open the browser

serve binds to this machine only.

./bin/backupbinder serve --host 127.0.0.1 --port 47831

Then open http://127.0.0.1:47831/. From there, choose Set up a backup. The first backup page is the same walk, from the command line.