Skip to content
Shellbay

Server Operations · about 2 min · 5 steps

Restic backups

Installs restic, creates an encrypted backup repository on this server, and can back up /etc and home folders every night.

Runs on

  • Debian / Ubuntu: supported
  • RHEL / Fedora: supported — Uses EPEL on RHEL-compatible systems.
  • Alpine: supported

What it changes on your server

  • Installs restic (from EPEL on RHEL-compatible systems).
  • Creates an encrypted repository in /var/backups/restic with a random password in /etc/shellbay/restic-password (root-only).
  • Optionally backs up /etc, /home, /root, /srv and /var/www nightly, keeping 7 daily, 4 weekly and 6 monthly snapshots.
  • Backups on the same disk don't survive the disk failing; copy the repository elsewhere for that.

What Shellbay asks you

  1. Back up every night?

    Restic keeps only what changed since the last snapshot, so nightly backups stay small. Turn this off to run backups yourself.

    Back up every night
    On or off. Default: on

Steps

  1. Prepare packages
  2. Install restic
  3. Create the encrypted repository
  4. Schedule nightly backups
  5. Check the repository opens

Shellbay checks the server before the first step, and stops at the first step that fails.

When it's done

  • Take a backup now with sudo /usr/local/sbin/shellbay-restic-backup; list snapshots with sudo restic -r /var/backups/restic --password-file /etc/shellbay/restic-password snapshots.
  • Copy the password in /etc/shellbay/restic-password somewhere safe: without it the backups can't be read.