Copy the archive somewhere else.

Where the site is read from, and where the finished archive is copied, are two different choices. You can skip the second one.

Where the files are read

Each site is read from one place: a directory on this machine, or one SFTP server. Saving a server replaces the previous server. The next backup copies that server into the local directory, then archives that copy. That step is covered on the first backup page.

Where the archive is copied

A destination receives a copy of the finished local archive. With no destination enabled, the run stays on this computer. You can save a destination and leave it disabled. It is used on a later backup only after you enable it.

The shipped kinds are SFTP, disk, S3, B2, and Google Drive. The local restic repository is the primary archive. It is not one of these kinds, and a disk destination cannot be the live site or that repository.

./bin/backupbinder add_destination --id SITE --root /path/to/site --kind sftp --host files.example --user backup --path /repos/site
./bin/backupbinder set_destination --id SITE --root /path/to/site --destination DESTINATION --enabled
./bin/backupbinder remove_destination --id SITE --root /path/to/site --destination DESTINATION

SFTP as a destination can be a different host from the server the site is read from. SSH uses the keys already on this machine. --path on a destination is the folder the archive is copied into. The JSON from add_destination includes a destination id. Pass that id to set_destination and remove_destination.

Google Drive

Google Drive uses restic's rclone backend. Put rclone on PATH or at .tools/rclone, create a remote with rclone config, and confirm the name appears in rclone listremotes. Then pass that remote name and a folder path.

./bin/backupbinder add_destination --id SITE --root /path/to/site --kind gdrive --host REMOTE --path backupbinder/SITE

For this kind, --host is the rclone remote name and --path is the folder in Drive. Saving an enabled Google Drive destination, or starting a backup that uses one, checks that the remote exists before any local snapshot work.

Secrets

var/secrets/ holds the restic password and any destination credentials, mode 0600. Access keys and secret keys are not printed back. They are rejected if you put them in var/sites/<id>.json.

S3 takes a bucket, an access key, and a secret key, plus an optional prefix and an optional endpoint. B2 takes a bucket, an account id, and an application key, plus an optional prefix. The keys are stored under var/secrets/.

Adding a kind

A JSON file in destinations/ next to the program can add a destination kind or replace one with the same id. The file names the fields, the restic URL template, credential environment variables, helper tools, and a few named checks the program already knows. The primary local repository stays built in.