How to collect SnapCenter database dump (NSM and SC_Quartz MySQL database dump)
Applies to
SnapCenter Server
Description
How to collect SnapCenter database dump (NSM and SC_Quartz MySQL database dump) for further troubleshooting by NetApp
Procedure
For SnapCenter 5.0 and up - Using SnapCenter PowerShell Toolkit:
- Log in to the SnapCenter Server via Remote Desktop or Console.
- Create a folder where the files will be saved
- Example:
C:\SC_Backup
- Example:
- Open a Powershell command :
-
> Open-SmConnection
- Provide a SnapCenter Admin user and password
-
- Run the following command to create a backup of the SnapCenter NSM and Quartz repositories, and config files:
> New-SmServerBackup -TargetPath <Folder_created_in_Step_2>
- Example:
New-SmServerBackup -TargetPath C:\SC_Backup
- Example:
- Navigate to the backup location and compress the folder with the latest timestamp:
<Folder_created_in_Step_2>\SnapCenter_DR\<SnapCenterhostname.fqdn.com>_<timestamp>
- Upload the zip file to NetApp using the associated Technical Support Case number
For all SnapCenter versions - Using MySQLDump:
-
Log in to the SnapCenter Server via Remote Desktop or Console.
-
Open Windows Command Prompt with elevated privileges
-
Change to the folder where MySQL is installed. The default paths are:
-
For versions before SnapCenter 5.0: "C:\Program Files\MySQL\MySQL Server 5.7\bin"
-
For SnapCenter 5.0 and up: "C:\Program Files\MySQL\MySQL Server 8.0\bin"
-
-
Run the MySQLDump command:
- Please note the path and the file name specified
"C:\nsm.sql"
are configurable and an alternate location / file name can be specified - Note: The MySQLDump commands will prompt for the MySQL root password. If the password is not known, it can be reset by following the steps in the below link:
-
For backing up only the NSM database (all SnapCenter versions):
-
> mysqldump.exe --user=root --host=localhost --password --protocol=tcp --port=3306 --default-character-set=utf8 --max_allowed_packet=1G --single-transaction=TRUE "nsm" --result-file "C:\nsm.sql"
-
-
For backing up only the SC_Quartz database (SnapCenter 6.0 and up):
-
> mysqldump.exe --user=root --host=localhost --password --protocol=tcp --port=3306 --default-character-set=utf8 --max_allowed_packet=1G --single-transaction=TRUE "SC_quartz" --result-file "C:\SC_quartz.sql"
- (When creating the dump for analysis only, there is no need to export the NSM database with the
--routines --events
parameters; if you intend to take the dump also a backup, use mysqldump.exe with this parameter, so that the store procedure will be included in the backup in case you will be restoring MySQL NSM from this backup)
- (When creating the dump for analysis only, there is no need to export the NSM database with the
-
- Please note the path and the file name specified
- Compress and Upload the zip file to NetApp using the associated Technical Support Case number