I’m having trouble automating the restic backup using systemd.

I followed the linked guide, which seems pretty straightforward. Backup works fine when I run it manually, but when I try to run systemctl status restic-backup.service I get the following error: Fatal: parsing repository location failed: s3: bucket name not found

I have triple-checked the file paths, and also added PassEnvironment=AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY RESTIC_REPOSITORY RESTIC_PASSWORD_FILE B2_ACCOUNT_ID B2_ACCOUNT_KEY to the restic-backup.service file, which I saw used elsewhere. This is my first time using systemd, so I’m not sure if I am overlooking an obvious step or what.

OS: Xubuntu

restic: installed locally following these steps

backup: Backblaze B2 bucket with s3

  • dgdft@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 days ago

    Seconding this answer. The error message and description scream envvar issue.

    This is my first time using systemd, so I’m not sure if I am overlooking an obvious step or what.

    @gedaliyah@lemmy.world Did you run a systemctl daemon-reload after making the PassEnvironment change to your service file?

    • gedaliyah@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      Yes, I’ve been running the two commands one after the other. I’m assuming that daemon-reload reloads the files into memory or whatever?