Skip to main content
SnapCenter Software 4.6
A newer release of this product is available.

Manage the SnapCenter Server repository

Contributors netapp-soumikd

Information related to various operations performed from SnapCenter is stored in the SnapCenter Server database repository. You must create backups of the repository to protect the SnapCenter Server from data loss.

The SnapCenter Server repository is sometimes referred to as the NSM database.

Prerequisites for protecting the SnapCenter repository

Your environment should meet certain prerequisites to protect the SnapCenter repository.

  • Managing storage virtual machine (SVM) connections

    You should configure the storage credentials.

  • Provisioning hosts

    At least one NetApp storage disk should be present on the SnapCenter repository host. If a NetApp disk is not present on the SnapCenter repository host, you must create one.

    For details about adding hosts, setting up SVM connections, and provisioning hosts, see the installation instructions.

  • Provisioning iSCSI LUN or VMDK

    For high availability (HA) configuration, you can provision either a iSCSI LUN or a VMDK in one of the SnapCenter Servers.

Back up the SnapCenter repository

Backing up the SnapCenter Server repository helps protect it from data loss. You can back up the repository by running the Protect-SmRepository cmdlet.

About this task

The Protect-SmRepository cmdlet accomplishes the following tasks:

  • Creates a resource group and a policy

  • Creates a backup schedule for the SnapCenter repository

Steps

  1. Launch PowerShell.

  2. On the SnapCenter Server host, establish a session using the Open-SmConnection cmdlet, and then enter your credentials.

  3. Back up the repository using the Protect-SmRepository cmdlet and the required parameters.

View backups of the SnapCenter repository

You can display a list of SnapCenter Server database repository backups by running the Get-SmRepositoryBackups cmdlet.

The repository backups are created according to the schedule specified in the Protect-SmRepository cmdlet.

Steps

  1. Launch PowerShell.

  2. From the command prompt, enter the following cmdlet, and then provide credentials to connect to the SnapCenter Server: Open-SMConnection

  3. List all available SnapCenter database backups using the Get-SmRepositoryBackups cmdlet.

Restore the SnapCenter database repository

You can restore the SnapCenter repository by running the Restore-SmRepositoryBackup cmdlet.

When you are restoring the SnapCenter repository, other SnapCenter operations that are running will be impacted because during the restore operation the repository database is not accessible.

Steps

  1. Launch PowerShell.

  2. From the command prompt, enter the following cmdlet, and then provide credentials to connect to the SnapCenter Server: Open-SMConnection

  3. Restore the repository backup using the Restore-SmRepositoryBackup cmdlet.

    The following cmdlet restores the SnapCenter MySQL database repository from the backups existing on either iSCSI LUN or VMDK:

    C:\PS>Restore-SmRepositoryBackup -BackupName MYSQL_DS_SC_Repository_mva-x3550-s09_09-15-2016_10.32.00.4445

    The following cmdlet restores the SnapCenter MySQL database when backup files are deleted accidentally in the iSCSI LUN. For VMDK manually restore the backup from ONTAP Snapshot copies.

    C:\PS>Restore-SmRepositoryBackup -BackupName MYSQL_DS_SC_Repository_mva-x3550-s09_09-15-2016_10.32.00.4445 -RestoreFileSystem
Note The backup that was used to perform the repository restore operation will not be listed when the repository backups are retrieved after performing the restore operation.

Migrate the SnapCenter repository

You can migrate the SnapCenter Server database repository from the default location to another disk. You might migrate the repository when you want to relocate it to a disk with more space.

Steps

  1. Stop the MYSQL57 service in Windows.

  2. Locate the MySQL data directory.

    You can usually find the data directory at C:\ProgramData\MySQL\MySQL Server 5.7\Data.

  3. Copy the MySQL data directory to the new location, for example, E:\Data\nsm.

  4. Right click on the new directory, and then select Properties > Security to add the Network Service local server account to the new directory, and then assign the account full control.

  5. Rename the original database directory, for example, nsm_copy.

  6. From a Windows command prompt, create a symbolic directory link by using the mklink command.

    "mklink /d "C:\ProgramData\MySQL\MySQL Server 5.7\Data\nsm" "E:\Data\nsm" "

  7. Start the MYSQL57 service in Windows.

  8. Verify that the database location change is successful by logging in to SnapCenter and checking repository entries, or by logging in to the MySQL utility and connecting to the new repository.

  9. Delete the original, renamed, database repository directory (nsm_copy).

Reset the SnapCenter repository password

The MySQL Server repository database password is automatically generated during SnapCenter Server installation from SnapCenter 4.2. This automatically generated password is not known to SnapCenter user at any point. If you want to access the repository database, you should reset the password.

What you will need

You should have the SnapCenter administrator privileges to reset the password.

Steps

  1. Launch PowerShell.

  2. From the command prompt, enter the following command, and then provide the credentials to connect to the SnapCenter Server: Open-SMConnection

  3. Reset the repository password: Set-SmRepositoryPassword

    The following command resets the repository password:

    Set-SmRepositoryPassword at command pipeline position 1
    Supply values for the following parameters:
    NewPassword: ********
    ConfirmPassword: ********
    Successfully updated the MySQL server password.

Find more information

The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by running Get-Help command_name. Alternatively, you can also refer to the SnapCenter Software Cmdlet Reference Guide.