≡ Menu

Shell Script To Backup MySql Database Server

Save the script and run it as a cron job:
@daily /path/to/yourmysql.sh

{ 55 comments… add one }
  • Luis Anaya October 17, 2013, 8:33 pm

    This is a really nice script although I did some changes for it, nothing major:

    – Commented the CHOWN. For some reason is was doing a root wide CHOWN, being that I am not running the backups as root, I do not need to CHOWN the files anyway, they’ll be owned by the administrative account.
    – I had to add the list of databases that I wanted not to back up, I though that just adding the ones that I wanted would exclude the ones that I did not wanted to.

    But, it is a very handy script and I appreciate you posting it. Thanks.

Security: Are you a robot or human?

Leave a Comment