Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
🔍 Discover Our Product Documentation

Barracuda Backup
Results will update as you type.
  • Introduction
  • Planning and Preparation
  • Getting to Know Barracuda Backup
  • Getting Started
  • Backup
    • About Barracuda Backup
    • How Backup Works
    • Configure Data Sources
    • Backup Scheduling
    • Data Exclusion
    • Data Retention
    • Protecting Microsoft Windows Systems
    • Protecting Linux/UNIX Systems
    • Protecting macOS Systems
    • Protecting VMware vSphere
    • Protecting Microsoft Hyper-V
    • Protecting Microsoft Exchange
    • Protecting Microsoft SQL
    • Protecting Microsoft Active Directory
    • Protecting Network Attached Storage
    • Protecting Non-Microsoft Applications
      • Protecting MySQL Databases
      • Protecting Oracle Databases
      • Protecting Barracuda Message Archiver
    • Protecting Proxmox VE
    • Protecting Encrypted Source Data
    • Windows Server Data Deduplication
  • Offsite Replication
  • Recovery
  • Reporting
  • Administration
  • Data Archival
  • Troubleshooting and Error Messages

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Protecting MySQL Databases
    Published Oct 24, 2025

    Protecting MySQL Databases

    Oct 24, 2025
    Subscribe

    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 mysqldump command to create a MySQL database dump file.

    Here is the syntax to create the batch file:

    cd\
    cd "<path-to-mysql-server-location>"
    mysql -u <privileged_account> -p -c -B mysqldump.exe <database_name> > <path-to-location-to-dump-the-database><name-of-script>

    An example of how to create a batch file using the mysqldump command:

    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 database_name > c:\temp\dump.sql

      Replace MySQL Server 5.6 with the MySQL server version, replace root with the account with privileges the database, replace database_name with the database name, and replace c:\temp\dump.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:

       

    Configure Agent to Run the Pre-Execute Script

    You can pre-execute your batch file prior to running a backup.

    Here is the syntax to edit the [configuration] section in the config.ini file:

    [configuration]  
    # Comment 
    preExecuteScript=<path-to-backup-agent><name-of-script>

    Use the following steps to modify the config.ini file:

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

    2. Navigate to the config.ini file on the server:

      C:\Program Files\Barracuda\Barracuda Backup Agent\config\

    3. Open the config.ini file in a text editor, and in the [configuration] section, enter the following lines:
      # Batch file to backup mysql database
      preExecuteScript="C:\mysqlbk.bat"

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

    4. Save and close the file. 


    We value your feedback.
    If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
    For general product inquiries or technical support, please contact the global Barracuda Support team.

    {"serverDuration": 11, "requestCorrelationId": "d1069f8f19e145cd879310e0c55e463e"}