4 ms·
Best practices of providing passwords to cronjob?
A linux machine on my company's LAN is tasked with taking database snapshots daily, as tier-1 backup. Those are remote MySQL databases I don't have root access to. The machine has a cronjob running mysqldump, using password authentication to the mysql servers. Output goes into Git for efficient storage†.
What is a sensible way to store authentication credetials (the plaintext passwords) used by the cronjob scripts for database access?
† For reference, so far I have about 700 daily dumps, each daily dump amounts to some 100...350MB, git store size is about 125MB total after running git-gc. The dumps are about 5...50MB per database, as produced by mysqldump.