Carrying on from the previous post - Disaster
Recovery of SnapCenter Server with IP Address Change - restoring SnapCenter
from a repository backup is straightforward.
Note: Using a SnapCenter 4.1 lab.
Restoring with MySQL and SnapManagerCoreService Up
and Running
PS> Open-SmConnection -SMSbaseUrl
https://SnapCtr.demo.corp.com:8146
cmdlet Open-SmConnection at command
pipeline position 1
Supply values for the following
parameters:
(Type !? for Help.)
Credential
PS> (Get-SmHost).HostName
DAG1.demo.corp.com
mb1.demo.corp.com
mb2.demo.corp.com
mb3.demo.corp.com
snapctr.demo.corp.com
PS> Get-SmRepositoryBackups
Backup Name
-----------
MYSQL_DS_SC_Repository_snapctr_07-26-2019_09.34.20.3512
MYSQL_DS_SC_Repository_snapctr_07-26-2019_10.35.02.3271
MYSQL_DS_SC_Repository_snapctr_07-26-2019_11.33.04.0570
MYSQL_DS_SC_Repository_snapctr_07-26-2019_12.33.03.8936
PS> Restore-SmRepositoryBackup
-BackupName MYSQL_DS_SC_Repository_snapctr_07-26-2019_12.33.03.8936 -HostName
SnapCtr.demo.corp.com
SnapCenter respository restored
successfully!
Note: Don’t need to use Open-SmConnection and
Get-SmHost before running SmRepositoryBackup cmdlets. I just did this to get
the correct hostname.
One Slighty Odd Thing
One slightly odd thing is that when you restore, you lose
the MySQL dmp from your backup location (perhaps this is to be expected).
PS> Restore-SmRepositoryBackup
-BackupName MYSQL_DS_SC_Repository_snapctr_07-26-2019_12.33.03.8936 -HostName
SnapCtr.demo.corp.com
Restore-SmRepositoryBackup: Backup files doesn't exist. Please provide
a valid location that contains the SnapCenter backup files or specify
RestoreFileSystem option to restore from the snapshot.
PS> Get-SmRepositoryBackups
Backup Name
-----------
MYSQL_DS_SC_Repository_snapctr_07-26-2019_09.34.20.3512
MYSQL_DS_SC_Repository_snapctr_07-26-2019_10.35.02.3271
MYSQL_DS_SC_Repository_snapctr_07-26-2019_11.33.04.0570
MYSQL_DS_SC_Repository_snapctr_07-26-2019_12.33.03.8936
PS> Restore-SmRepositoryBackup
-BackupName MYSQL_DS_SC_Repository_snapctr_07-26-2019_11.33.04.0570 -HostName
SnapCtr.demo.corp.com
SnapCenter respository restored
successfully.
Image: After 2 restores, I’ve lost 2 dmp’s!
Q: How to Restore if the Database is Completely
Gone?
If the database is completely gone and MySQL won’t start,
what to do?
I’ve tried a few things but have not yet found the magic
trick using DB restore CLI commands (MySQL or SnapCenter). The easiest way is going
to be to revert the VM and database to a known good date.
This link looked promising (not for SnapCenter database
though):
Or simply, with SnapManagerCoreService and MySQL57
stopped, replace these files with files from a known good backup -
C:\ProgramData\NetApp\SnapCenter\MySQL
Data\Data
ib_buffer_pool
ib_logfile0
ib_logfile1
ibdata1
- restart MySQL57 and SnapManagerCoreService. And – hey presto
– should all be back up and running again.
Image: Need to restore these ib files
Comments
Post a Comment