How to backup MySQL on Attix5 Server Edition for Windows

To backup a MySQL database in Windows requires the user to dump a copy of the database first using the mysqldump utility. The Attix5 SE client software will then backup this dump file.

Windows Setup

  1. Install the Script plug-in using the Attix5 plug-in installer installed found on the Downloads page.
  2. Create a directory where the dump file will be dumped to, eg c:\MySQLdump\
  3. Create a batch file using Notepad. Copy/paste the following:

    mysqldump --opt -h hostname -u user --password=password database > C:\MySQLdump\testdump.sql

    Note: you will need to change hostname, user, password and database to the correct parameters for your database. Ensure that this command is on one line only.
  4. Save this notepad file to your Attix5 Pro\Backup Client SE\ installation directory as a ".bat" file (not .txt). In This example we have used A5MySQLDump.bat
  5. Test the script by opening a Windows command line prompt. Navigate to the location where you saved the script, enter the name of the script and press Enter. The script should dump the database to the c:\MySQLdump folder. If it does not, check the error and fix any spelling issues. 
  6. Open Attix5 SE client and go to Tools, Plugins, Scripting.
  7. Click Add to add a new script.

    Backup Script

  8. Enter a name for the script and set the script to run on "Backup Start".
  9. In the "Execute" field, enter the full path of the script.
  10. In the "Execute in folder" field, enter the path of the mysqldump executable file - usually the "bin" directory of the MySQL folder.
  11. Tick "Wait for process to complete" checkbox and tick "Abort backup if exit code is not 0". Click Ok and Ok again to return to the user interface.
  12. In the selection tree, select the folder for backup that you created the dump file. In our example it was c:\MySQLdump\
  13. Click "Backup" to start the backup process.

The database should then be dumped to the specified folder and this folder should be backed up. The most common errors are spelling mistakes in the script for the username, database and password.

Once the backup has completed, run a restore on this dump file testdump.sql and ensure that you can successfully restore it to a test database.

0 (0)
Article Rating (No Votes)
Rate this article
    Attached Files (1)
    There are no comments for this article. Be the first to post a comment.
    Security Code Security Code
    Related Articles RSS Feed
    How to Run a Snapshot Export Backup
    Viewed 2088 times since Sun, Aug 16, 2015
    How to restore SQL database files with a .DAT extension in Attix5
    Viewed 7875 times since Fri, May 16, 2014
    How to configure the MS SQL Attix5 Pro Plugin
    Viewed 6177 times since Fri, May 16, 2014
    How to Backup Windows System State
    Viewed 3123 times since Sun, Aug 16, 2015
    Exchange Backup Frequently Asked Questions
    Viewed 2863 times since Mon, Aug 17, 2015
    How to calculate your backup upload speed
    Viewed 3584 times since Fri, Jun 27, 2014
    How to setup Streaming Backup on Attix5 Pro Server Edition
    Viewed 4937 times since Tue, May 20, 2014
    Throttle connection upload speed on Attix5 Pro
    Viewed 5532 times since Thu, May 15, 2014
    How to backup a MS SQL database using the Attix5 VSS plug-in
    Viewed 7202 times since Wed, Nov 12, 2014