If you read my last In Brief post, you may have tried setting up a
cron job to run mysqldump
nightly, gone back to
check the results the following day and found a zero byte file
where you expected to see a dumpfile.
-rw-rw-r-- 1 forge forge 0 Mar 5 00:00 dump-nightly.sql
Don't worry! The backup still ran, but Forge does some auto-magic output redirection that had me guessing for a little while.
The Magic Of 2>&1
When I saw that my sql file was zero-length, I started trying to
track down what went wrong. First stop was Forge's log file for
the job in the web console. Viewing this showed that
mysqldump
had run just fine.
-- MySQL dump 10.13 Distrib 5.7.10, for Linux (x86_64)
--
-- Host: localhost Database:
-- …
[Read more]