≡ Menu

Backup Mysql with Bash Script

MySQL

Here is how to perform backups on the mysql database by using a bash script:

First step just create a file backup.sh

and copy the following scripts into backup.sh file

Now you just need to make it executable:

And then add it to the crontab so it’ll run automagically:

In this case it’ll run every day at 1 AM.

{ 0 comments… add one }

Leave a Comment

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.