We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Backup

Protecting MySQL Databases

  • Last updated on

You can protect MySQL databases by using native tools to create a backup dump file or by configuring a pre-execute script on the Barracuda Backup Agent.

Create a Batch File

Use the following steps to configure the Barracuda Backup Agent to use a pre-execute script to create a MySQL database dump file:

  1. Verify the Barracuda Backup Agent is installed on all systems to be backed up.
  2. Open a text editor, for example Notepad, and type the following lines:
    cd\
    cd "Program Files (x86)\MySQL\MySQL Server 5.6\bin"
    mysql -u root -p -c -B mysqldump.exe sakila > c:\temp\test.sql

    Replace root with the account with privileges to the database, replace sakila with the database name, and replace c:\temp\test.sql with the directory and file name of the location where you want to dump the database.

  3. Save the text file as a batch (.bat) file:
    batch_file.png 

Configure Agent to Run the Pre-Execute Script

Use the following steps to modify the config.ini file to pre-execute your batch file prior to running a backup:

  1. Open the Services console. Right-click the Barracuda Backup Agent service, and click Stop.

  2. Navigate to and open the config.ini file in a text editor, located in the C:\Progarm Files\Barracuda\Barracuda Backup Agent\config directory. 

  3. Enter the following lines below the configuration section:
    #Batch file to backup mysql database
    preExecuteScript= c:\mysqlbk.bat
    config.png

    Replace c:\mysqlbk.bat with the location and your batch file name.

  4. Save the file. 
Last updated on