NetWorker - 如何復原 NetWorker 管理主控台資料庫
Summary: 您可以使用 NetWorker recoverpsm 命令將 NetWorker Management Console (NMC) 資料庫還原至 nmcdb 的備份。
Instructions
如果您已識別 NMC 資料庫損毀,則可以使用 NetWorker recoverpsm 命令,以將 NMC 資料庫還原到 nmcdb。依預設,預設伺服器保護原則內應有 NMC 伺服器備份工作流程。請確定已正確排程和設定,以完成 NMC 資料庫備份。
如需 NMC 伺服器保護的詳細資訊,請參閱適用於兩者的《NetWorker 管理指南》和《NetWorker 命令參考指南》 savepsm 和 recoverpsm 選項。您可以在 Dell NetWorker 產品頁面找到這些文件。
- 請確定有使用
mminfo命令:
mminfo -avot -q client=nmc_server_name
[root@linux1 ~]# mminfo -avot -q client=linux1.amer.lan | grep nmcdb_stage
ClientBackupPool.001 Data Domain linux1.amer.lan 08/15/2022 02:00:17 PM 53 MB 687518690 cb full /nsr/nmc/nmcdb_stage
注意:如果您沒有
nmcdb_stage 存儲集,則無法還原 NMC,唯一的選項是將其重新 安裝 為全新例項。
- 在 NMC 伺服器上,開啟管理根命令提示字元以停止 NMC
GSTD服務 (如果執行中):
Windows: net stop gstd
Linux: systemctl stop gst
使用 tasklist/Task Manager 或 PS 命令,以確保 GSTD 服務已停止。
- 使用
CD命令以轉到 NMC 的安裝 bin 目錄。檢查以確保recoverpsm命令會列在此目錄中。此命令用於還原 NMC 資料庫。
Windows: [NMC Installation Dir\Management\GST\bin
Linux: /opt/lgtonmc/bin
- 執行
recoverpsmNMC 伺服器上的命令:
recoverpsm [-s server] [-c client-name] [-d destination] [-p pass-phrase] [-t time] [-hfO] Staging_Directory
Options:
|
|
指定來源 NMC 伺服器 |
|
|
指定要存取的目錄 |
|
|
使用此選項可在開始恢復操作之前刪除資料庫目錄中存在的目前資料庫檔。 |
|
|
顯示有關 |
|
|
使用此選項可省略資料庫認證檔案的復原作業。只有在憑據檔仍然存在並且您不想使用恢復中的憑據檔的極少數情況下,才使用此選項。 |
|
|
使用此選項可在嘗試恢復 AES 加密資料庫檔時指定其他密碼短語。如需更多詳細資料,請參閱還原 (1m)。 |
|
|
指定執行 NMC 資料庫備份的 NetWorker 伺服器名稱 |
|
|
使用此選項可復原下列指定日期的資料庫: |
|
|
指定備份操作 |
範例:
[root@linux1 bin]# ./recoverpsm -f -s linux1.amer.lan -c linux1.amer.lan -p Pa$$w0rd01 /nsr/nmc/nmcdb_stage 108157:recover: Restoring database files... 179040:recover: Step (1 of 11) for PID-6264: Recovery has been started on the client 'linux1.amer.lan'. 179733:recover: Step (2 of 11) for PID-6264: Checking if the set of exclusion files is given for the recovery of the selected files for the client 'linux1.amer.lan'. 179738:recover: Step (3 of 11) for PID-6264: Setting the server 'linux1.amer.lan' for the media database calls for the recovery of the selected files for the client 'linux1.amer.lan'. 179745:recover: Identified a file level recovery with PID 6264 to relocate to the new path '/nsr/nmc/nmcdb' for the client 'linux1.amer.lan'. Updating the total number of steps from 11 to 8. 179748:recover: Step (4 of 8) for PID-6264: Initializing a recovery job with the nsrjobd for the recovery of the selected file(s) for the client 'linux1.amer.lan'. 179749:recover: Step (5 of 8) for PID-6264: Validating and setting the relocation path '/nsr/nmc/nmcdb' for the recovery of selected file(s) for the client 'linux1.amer.lan'. 179754:recover: Step (6 of 8) for PID-6264: Initializing the file level recovery of the client 'linux1.amer.lan'. 179730:recover: Step (7 of 8) for PID-6264: Building the recovery tree of the client 'linux1.amer.lan'. Recovering 1500 files within /nsr/nmc/nmcdb_stage/ into /nsr/nmc/nmcdb Requesting 1500 file(s), this may take a while... 179728:recover: Initializing the recovery session with the NetWorker server 'linux1.amer.lan' to recover the selected files. Recover start time: Mon 15 Aug 2022 02:20:37 PM PDT 179718:recover: Initializing to recover multiple streams of data from the NetWorker server 'linux1.amer.lan'. Requesting 1 recover session(s) from server. 179714:recover: Initializing the child threads to recover the given recovery stream from the NetWorker server 'linux1.amer.lan'. 179713:recover: Initializing to set up a connection to start reading the data from the recover stream. Enabling compressed restore for save set ID '687518690' with 'Data Domain' device path '/linux1/ClientBackupDevice01'. Successfully established the direct file retrieval session for save set ID '687518690' with 'Data Domain' volume 'ClientBackupPool.001'. ./pgdata/backup_label ... ./pgdata/ 179716:recover: Coordinating all the child recovery processes. 179717:recover: Releasing all the resources held by the recovery process. 179721:recover: All recovery streams from the NetWorker server 'linux1.amer.lan' are read successfully. Received 1500 file(s) from NSR server `linux1.amer.lan' Recover completion time: Mon 15 Aug 2022 02:20:39 PM PDT 179068:recover: Step (8 of 8) for PID-6264: The recovery completed successfully on the client 'linux1.amer.lan'. 108161:recover: Setting permissions for the restored database files
- 在 NMC 伺服器上,開啟管理根命令提示字元以停止 NMC
GSTD服務:
net start gstd
Linux:
systemctl start gst
使用
tasklist/Task Manager 或 PS 命令,以確保 GSTD 服務已開始。
- 確定您可以連線至 NMC。
- 監視gstd.raw NMC 服務啟動期間是否有任何錯誤:
/opt/lgtonmc/logs/gstd.raw
Windows:
[Install Drive]:\Program Files\EMC NetWorker\Management\GST\logs\gstd.raw
Additional Information
NMC 伺服器的 ..\Management\GSTD\logs\gstd.raw 或 /opt/lgtonmc/logs/gstd.raw 可用來確認是否有 NMCDB 損毀:
範例:
31581 1501512324 2 0 0 5632 6204 0 NMC-server gstd NSR warning 23 *** gstd starting at %s 1 36 24 Mon Jul 31 10:45:24 2017
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.3852 0 50 Internal error: could not create database process.
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.643852 0 50 Internal error: could not create database process.
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.643852 0 50 Internal error: could not release database handle.
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.675017 0 48 Internal error: could not stop database process.
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.675017 0 54 FATAL ERROR: could not stop 'EMC GST Database Service'
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.675017 0 48 Internal error: could not stop database process.
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.675017 0 48 Internal error: could not stop database process.
NMC-server gstd NSR notice 5 %s %s 2 0 24 MM/DD/YYY HH:MM:SS.675017 0 54 The most recently called subfunction returned error 2.
NMC-server gstd NSR warning 2 %s 1 0 27 library error 22 os error 0
NMC-server gstd NSR warning 23 *** gstd stopping at %s 1 36 24 MM/DD/YYY HH:MM:SS