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)
    Comments
    There are no comments for this article. Be the first to post a comment.
    Name
    Email
    Security Code Security Code
    Related Articles RSS Feed
    How to Backup Capita SIMS Using the Attix5 Plugin
    Viewed 3502 times since Tue, Apr 12, 2016
    How to Setup Email Notifications
    Viewed 3129 times since Sat, Aug 15, 2015
    How to Backup Windows System State
    Viewed 2423 times since Sun, Aug 16, 2015
    Configure SQL 2005 & 2008 Express for Attix5 SQL Plugin
    Viewed 2378 times since Fri, May 16, 2014
    Enable VSS writer for Exchange 2003 servers
    Viewed 4351 times since Tue, Nov 11, 2014
    How to setup Streaming Backup on Attix5 Pro Server Edition
    Viewed 4823 times since Tue, May 20, 2014
    How to backup a MS SQL database using the Attix5 VSS plug-in
    Viewed 7002 times since Wed, Nov 12, 2014
    How to run the Attix5 service as a specific user
    Viewed 3367 times since Fri, May 16, 2014
    How to calculate your backup upload speed
    Viewed 3470 times since Fri, Jun 27, 2014