Comments - Making Backups with mariadb-dump

5 years, 6 months ago Joi Owen

It's bad practice to put a password in a cron table. Our previous admin did this, and he used the root mysql account in system root's crontab, instead of making a backup_admin, so every PHB that wants to see backup status sees that root password in the emails cron sends out for status from that host.

I make a unix local account with a custom .my.cnf with the account name and password, plus a wrapper shell script to call from cron where all the options are embedded, and I have it write its own logs. Everything is set owned and readable only by the local account and thus the status emails from the cron jobs do not include any passwords. And, because the auth info is in .my.cnf, the script itself is easily reused across hosts.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.