Deployed a backup script on a new server, tested it manually — worked fine. Set up crontab, came back next morning, no backup. Turns out /usr/local/bin wasn’t in cron’s PATH so pg_dump just silently didn’t exist.

Switched to absolute path and it worked immediately. Fifteen minutes of debugging for a one-character fix. I keep making this mistake every time I set up a new box. At this point I should just have a checklist taped to my monitor.

  • Björn@swg-empire.de
    link
    fedilink
    arrow-up
    4
    ·
    3 hours ago

    That’s one reason why I like using systemd timers instead of cronjobs. You can easily test it by running the unit instead of setting the job to “in a minute”.

    Downside is that you don’t easily get notification mails for any output.