Commands to Back up or Restore the MySQL database or tables

Article:TECH83161  |  Created: 2005-01-24  |  Updated: 2010-08-13  |  Article URL http://www.symantec.com/docs/TECH83161
Article Type
Technical Solution

Product(s)

Environment

Issue



Symantec Technical support recommends backing up the Symantec Brightmail Message Filter database or tables on a regular basis.


Solution



Ensure you are in the \mysql\bin directory when running the various commands.  Usually the mysql\bin directory is located in the following location:

  • Windows: \MySQL\bin
  • Linux & Solaris: /opt/symantec/SBAS/ControlCenter/MySQL/mysql-pro-4.0.16-pc-linux-i686/bin

A restore from a back up needs to be applied to the same version of Symantec Brightmail Message Filter. If you have a backup from version 6.1.1 and restore it to version 6.2 problems may occur.

In all commands below replace <password> with the password for the Symantec Brightmail Message Filter MySQL database.
If you do not know the password to substitute for <password> follow the steps in Finding the MySQL password for Symantec Brightmail Message Filter.

You may redirect where the output file is stored for ease of backup

To backup the entire Smantec Brightmail Message Filter MySQL database:

mysqldump -ubrightmailuser -p<password> -h127.0.0.1 --opt brightmail > brightmail.sql

To backup only the configuration tables:

mysqldump -ubrightmailuser -p<password> -h127.0.0.1 --opt brightmail admin_user black_white_sender host settings_alert settings_consent settings_ldap settings_log settings_quarantine settings_report settings_scheduled_reports settings_smtp_filter_host settings_smtp_mngnt_host settings_system sieve_condition sieve_import sieve_rule status status_rule > configuration.sql

 To backup only the Reports tables:

mysqldump -ubrightmailuser -p<password> -h127.0.0.1 --opt brightmail report_alias report_domain report_ip_address report_summary settings_report settings_scheduled_reports > report.sql

To backup only the Logs tables:

mysqldump --ubrightmailuser --p<password> -h127.0.0.1 --opt brightmail log log_component log_marker log_severity log_summary settings_log> log.sql

To backup only the Quarantine tables:

mysqldump --ubrightmailuser --p<password> -h127.0.0.1 --opt brightmail user user_spam_message spam_message spam_message_summary spam_message_release_audit settings_quarantine settings_ldap > quarantine.sql

To restore the entire database or tables from a backup:

mysql --ubrightmailuser --p<password> brightmail -h127.0.0.1 brightmail< <filename.sql>

 The text <filename.sql> is the name of the backup file and should be typed without the brackets.

 



Legacy ID



2005022411015763


Article URL http://www.symantec.com/docs/TECH83161


Terms of use for this information are found in Legal Notices