Skip to content

Troubleshooting

Common problems with the restic backup worker, what causes them and how to fix them.

A backup finishes with exit code 3

Cause: restic made the snapshot but could not read some of the files, so the snapshot is incomplete. Files the restic user cannot read are left out.

Fix: give the restic user read access to everything you back up, or move the files into /var/lib/restic/include and chown them to restic:restic. Files under /home, /root and /run/user are hidden from the scheduled backup; keep the data elsewhere.

RESTIC_BACKUP_PATHS is empty or invalid KEY=value line

Cause: /etc/restic/restic.env is missing a key or has a line that is not KEY=value.

Fix: make sure all four keys are present, one per line, without quotes, see Configuration.

restic password file is missing

Cause: the first-boot service has not finished, or /etc/restic/password was removed.

Fix: wait for first boot. If the password was removed, restore it from your copy: the existing repository cannot be opened without it.

wrong password or no key found

Cause: the password in /etc/restic/password does not match the repository, for example after a new instance created its own password.

Fix: put the original password back in /etc/restic/password, owned by restic:restic with mode 0600.

The restore script refuses the target

Cause: the target is not an absolute path, is not empty, or is /, /var, /etc, a backed-up folder or the local repository.

Fix: pass a new, empty directory such as /tmp/restore-<date>, then copy the files you need from there.

S3 repository errors

Cause: the repository has not been initialized, the instance has no IAM role, or the role does not allow the bucket and prefix.

Fix: check the role's permissions and run restic init once for the new repository, see Use an Amazon S3 repository.

First boot failed

Fix: read the log and retry:

sudo journalctl -u sushi-restic-firstboot --no-pager
sudo systemctl restart sushi-restic-firstboot

If it still fails, contact info@softwaresushi.com.