My backup scripts and tools
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.5 KiB


  • On server, we have a separate user account “jim-backups”. Password for this account is in bitwarden in the “Backups” folder, under ssh

  • Repository keys are repokeys, which get stored on the server, inside the repo. Passphrases are stored:

    • on clients (in /opt/borg/passphrase, for making backups)
    • in bitwarden (under borg <hostname>, user repo key)
  • Each client has two SSH keys for connecting to the server:

    • /opt/borg/ssh/id_ecdsa_appendonly
      • configured on server for append-only operation
      • used for making backups
      • no password
    • /opt/borg/ssh/id_ecdsa
      • configured on server for read-write operation
      • used for manual recovery, management, pruning
      • password in bitwarden (under borg [hostname], user read-write ssh key)
  • Pruning requires the password and is a manual operation, and should only be run when the client has not been compromised.

    sudo /opt/borg/
  • Systemd timers start daily backups:

    /etc/systemd/system/borg-backup.service -> /opt/borg/borg-backup.service
    /etc/systemd/system/borg-backup.timer -> /opt/borg/borg-backup.timer
  • Backup script /opt/borg/ uses configuration in /opt/borg/backup.yaml to generate our own list of files, excluding anything that’s too large by default. This requires borg 1.2.0b1 or newer, which is why the setup scripts download a specific version.


Run on client:

sudo git clone /opt/borg
sudo /opt/borg/