User guide

Table Of Contents
87
McAfee
®
Quarantine Manager
6.0 User Guide About DB Suite Utility
Archiving or Retrieving the existing MySQL database
14
Archiving or Retrieving the existing MySQL database
You can archive or retrieve the existing MySQL database only using command line
arguments given below:
To backup or archive the existing database:
1 Click
Start | Run, type services.msc, then click OK.
2 From the Services window, stop the McAfee Quarantine Manager service.
3 From the command prompt, go to the bin directory of MySQL installation folder.
4 Execute the following command:
mysqldump --complete-insert -n --add-drop-table -R <Database> -u
<DatabaseUser> -p<DatabaseUserPassword> -r "<CompletePathofBackupFile>"
For example: If the Database name is mqm, Database user is root, password is calangute, and
backup file is C:\Backups\MQM\MQM60Backup.sql, use the following command:
mysqldump --complete-insert -n --add-drop-table -R mqm -u root -pcalangute
-r "C:\Backups\MQM\MQM60Backup.sql"
To retrieve or restore the existing database:
1 Click Start | Run, type services.msc, then click OK.
2 From the Services window, stop the McAfee Quarantine Manager service.
3 From the command prompt, go to the
bin directory of MySQL installation folder.
4 Execute the following command:
mysql -e "source <CompletePathofBackupFile>" -u <DatabaseUser>
-p<DatabaseUserPassword> <Database>
For example: If the Database name is mqmv6, Database user is scott, password is tiger, and
backup file is C:\Backups\MQM\MQM60Backup.sql, use the following command:
mysql -e "source C:\Backups\MQM\MQM60Backup.sql" -u scott -ptiger mqmv6
To schedule a task to backup the existing database
1 Create a batch file with the following information:
md c:\backups\%DATE%\
cd c:\backups\%DATE%\
<InstallPath>\bin\mysqldump.exe --complete-insert -n --add-drop-table -R
<database-name> -u <username> -p<password> -r "MQM60Backup.sql"
2 Click Start | Control Panel | Scheduled Tasks | Add Scheduled Task.
3 Click
Next and browse for the batch file created in Step 1.
4 Click
Next.
5 Follow the on-screen instructions to schedule the task and complete the wizard.