Backup MySQL Databases operating on a Windows Server utilizing Systems Center Data Protection Manager (DPM) 2012.

Running MySQL on a Windows machine is fairly straight ahead.  One of the down sides although is that MySQL just isn’t VSS conscious and should mis-behave when again up software program similar to Data Protection Manager or ShadowProtect.  Data Protection Manager (DPM) has the power (principally referred to as Pre-Backup and Post-Backup Scripts) to carry out actions earlier than and after a backup run.

After putting in the DPM Protection Agent onto the pc you need to run the shield (by default its %ProgramFilespercentMicrosoft Data Protection ManagerDPM) You’ll discover a Scripting Folder and inside a ScriptingConfig.xml file which ought to solely include XML Schema knowledge, we’ll need to increase on this by including the next strains inside ScriptConfiguration

   <DatasourceScriptConfig DataSourceName="Data supply">      ”PathScript Parameters”       "PathScript Parameters”       30

DataSourceName must be the identify of the Data Source that you’re defending (matching in DPM Console) for instance H:MySQL_Backup and in our case we solely need to use a PreBackupScript (ie M:MySQL_BackupBackupDB.cmd) which can dump a backup from our MySQL Databse right into a single SQL file earlier than the precise DPM Backup occasion.  As an instance, the next will execute a backup for MySQL.  You might want to change -User -Password and the MaharaProd to one thing that fits your setting.

@echo off set CurrentDate=%date:~-10,Ppercent_percentdate:~S,Ppercent_percentdate:~-A,A% transfer /y M:MySQL_BackupMahara-*.sql M:MySQL_BackupPreviousBackup.sql mysqldump –consumer backupuser –password=changethis MaharaProd > M:MySQL_BackupMahara-%CurrentDate%.sql

The above will output a Mahara-DD_MM_YYYY.sql file in addition to make a Previous Backup earlier than permitting DPM to go forward and create the restore level.

Check out this TechNet article for extra particulars on the way to get this operating.

Leave a Reply