Restore-StorageGroupCopy (RTM)

 

適用版本: Exchange Server 2007

上次修改主題的時間: 2007-10-23

本主題說明如何在 Microsoft Exchange Server 2007 叢集連續複寫 (CCR) 或本機連續複寫 (LCR) 解決方案中使用 Restore-StorageGroupCopy 指令程式啟動被動儲存群組副本。在 CCR 組態中,當自動裝載支援沒有裝載資料庫而系統管理員必須明確介入以裝載資料庫時,便會使用 Restore-StorageGroupCopy。在此情況下,系統管理員會先使用 Restore-StorageGroupCopy,再執行 Mount-Database 作業。在 LCR 組態中,會使用 Restore-StorageGroupCopy 來停用 LCR 並讓被動副本可供 Mount-Database 使用。在這兩種組態中,Restore-StorageGroupCopy 會終止到被動副本的複寫,並讓它可供 Mount-Database 指令程式使用。

語法

Restore-StorageGroupCopy -Identity <StorageGroupIdParameter> [-DomainController <Fqdn>] [-Force <SwitchParameter>] [-ReplaceLocations <SwitchParameter>]

詳細描述

Restore-StorageGroupCopy 指令程式需要啟用 Exchange 2007 系統管理員才能啟動 CCR 或 LCR 副本,以便從主動資料庫或儲存群組的失敗中復原。此命令會同時用於 CCR 與 LCR 組態中。依預設,當系統管理員終止複寫時,就會使用 Restore-StorageGroupCopy 指令程式。這會同時用於 CCR 與 LCR 組態中。

在 LCR 組態中,預期系統管理員會透過檔案系統或磁碟區作業重新放置資料。建議使用此方法來維護副本與生產資料庫路徑之間的慣例。

當系統管理員想要終止複寫,並將副本的路徑推入生產儲存群組與資料庫位置屬性中時,請在 LCR 組態中使用 ReplaceLocations 參數。生產資料庫與儲存群組物件的路徑會更新為副本的位置。此為快速作業,並允許立刻裝載資料庫。若未使用此選項,則必須於生產位置提供副本中的資料。若此作業無法透過檔案系統 rename 命令或磁碟區作業來完成,中斷持續時間將和複製記錄與資料庫所需的時間成比例。

在 CCR 組態中,要啟動的副本會在不同的節點上,並位於正確的位置中。因此,不需要將記錄或資料庫的位置變更為啟動的一部份。

您可以使用 Restore-StorageGroupCopy 指令程式,於新的主動節點上覆寫裝載儲存群組的遺失限制。例如,AutoDatabaseMountDial 可設定為 Lossless,這表示在最後裝載的節點中,只要有一個記錄檔無法在副本上複製並重新顯示,就不會裝載資料庫。當處於此狀態時,您可以還原儲存群組副本並裝載資料庫。

note附註:
在某些情況下,於新的主動節點上覆寫裝載儲存群組的遺失限制時,可能需要重新植入先前的主動節點儲存群組。若遺失區域中有一或多筆記錄已經寫入至資料庫中,則需要執行重新植入作業。

Restore-StorageGroupCopy 指令程式可完成下列目標:

  • 將儲存群組的資料庫標示為可裝載。

  • 針對在儲存群組中裝載資料庫可能導致資料遺失提供相關報告。

  • 檢查副本中是否具有在來源伺服器上針對儲存群組建立的所有記錄,若沒有,便會再嘗試複製它們一次。

    note附註:
    若所有記錄檔均無法使用,且 Restore-StorageGroupCopy 指令程式無法順利從來源位置複製它們,則所產生的資料庫將會發生資料遺失。如需 CCR 如何管理資料遺失的相關資訊,請參閱叢集連續複寫
  • 若為 LCR,它也會停用儲存群組副本。

  • 若為 LCR,若所產生的資料庫發生資料遺失,則會重新產生內容索引。

  • 若為 LCR,必須在主控儲存群組的伺服器上執行此命令。

    note附註:
    若為 CCR,必須先裝載指定的副本,它才能成為作用中的副本。裝載並啟動之後,該副本便會成為後續複寫活動的新來源副本。

若要執行下列程式碼,必須對您使用的帳戶委派下列項目:

  • Exchange Server 系統管理員角色和目標伺服器的本機 Administrators 群組

如需管理 Exchange Server 2007 所需之權限、委派角色及權利的相關資訊,請參閱權限考量

參數

參數 必要 類型 描述

Identity

必要

Microsoft.Exchange.Configuration.Tasks.StorageGroupIdParameter

Identity 參數會採用下列其中一個值:

  • GUID
  • 儲存群組名稱

Confirm

選用

Boolean

Confirm 參數會使得命令暫停處理,並要求系統管理員確認命令將進行的動作之後才會繼續處理。預設值為 $true。

DomainController

選用

Microsoft.Exchange.Data.Fqdn

若要指定能找出叢集信箱伺服器之網域控制站的網域全名 (FQDN),請在命令中加入 DomainController 參數。

Force

選用

System.Management.Automation.SwitchParameter

以程式方式來執行工作,而且不適合提示系統管理員輸入時,可以使用 Force 參數。如果沒有在指令程式中提供 Force,就會提示系統管理員輸入。如果在指令程式中提供 Force,但省略了值,其預設值為 $true。

ReplaceLocations

選用

System.Management.Automation.SwitchParameter

當系統管理員想要終止複寫,並將副本的路徑推入生產儲存群組與資料庫位置屬性中時,請在 LCR 組態中使用 ReplaceLocations 參數。生產資料庫與儲存群組物件的路徑會更新為副本的位置。

ReplaceLocations 參數在 CCR 組態中無效。

WhatIf

選用

Boolean

WhatIf 參數可指示指令程式模擬它將對物件採取的動作。藉由使用 WhatIf 參數的方式,系統管理員不需實際套用變更,就能先檢視任何變更。預設值為 $true。

錯誤

錯誤 描述

Use 'Msg 1: Cluster not available' and change task name.

由於通訊問題或叢集無法使用,工作無法連接至叢集。

Use 'Msg 2: Wrong Version' and change task name.

伺服器不是 Exchange 2007 伺服器。

Use 'Msg 3: No Permissions' and change the task name.

使用者沒有 Exchange Server 系統管理員權限。

<ServerName> or <StorageGroupName> does not exist.

指定的儲存群組伺服器不存在。

Restore-StorageGroupCopy: Must be run on <ServerName>'s host machine.

必須在複寫目標的電腦上執行作業。

Restore-StorageGroupCopy: ReplaceLocations can only be used with Local Continuous Replication configurations.

指定的參數不存在,或指定的組合無效。

CCR: No continuous replication copy of '<SGName>' to restore.

LCR:No continuous replication copy of '<SGName>' to restore.

此為不支援的複寫組態。未啟用複寫。

Use 'Msg 10: Comm' and change the task name.

已指定 ReplaceLocations 參數,因此無法以所需的路徑來更新生產儲存群組位置。

'<SGName>' is not in a healthy condition; storage group must be viable for a successful mount.

指定的副本狀況不正常。

The database is not dismounted. Please dismount it before proceeding.

未卸載指定之儲存群組的資料庫。

Replication for '<SGName>' is not prepared to support a Restore-StorageGroupCopy. Retry your operation after a brief wait.

複寫尚未準備好,因此無法使用儲存群組。

Replication for '<SGName>' is not prepared to support a Restore-StorageGroupCopy due to error (<ErrorCode>). Retry your operation after a brief wait.

發生內部錯誤。Restore-StorageGroupCopy 命令無法針對 LCR 取得所有資料庫的相關資訊。

Replication for '<SGName>' is not prepared to support a Restore-StorageGroupCopy due to a backup in progress. Terminate the backup and retry.

因為備份正在進行中,所以發生內部錯誤。

Replication for '<SGName>' is not prepared to support a Restore-StorageGroupCopy due to error (<ErrorCode>). Retry your operation after a brief wait.

發生內部錯誤:未連線。

Restore-StorageGroupCopy: <SGName> has no database.

儲存群組中沒有資料庫。

Restore of <StorageGroupName> was successful. All logs were successfully copied.

Or

Restore-StorageGroupCopy: Restore of <StorageGroupName> was successful and production paths were updated. All logs were successfully copied.

Or

Restore-StorageGroupCopy: Restore of <StorageGroupName> was successful. All logs were not successfully copied.

Time of the failure was: <FailureTime>.

Last log copied was <LogFileName> at <ItsChangeTime>.

Or

Restore-StorageGroupCopu: Restore of <StorageGroupName>was successful and production paths were updated. All logs were not successfully copied.

Time of the failure was: <FailureTime>.

Last log copied was <LogFileName> at <ItsChangeTime>.

成功報告會詳細描述所採取的動作及其結果,其中包括因還原而造成資料遺失的數量。此報告也會指出是否已更新路徑。此報告也會指出下一步應該做什麼。

<SGName> already marked as available for a mount; no action taken.

儲存群組已可使用於裝載。

範例

下列程式碼範例顯示如何在名稱為 SG1 的儲存群組上終止複寫。

Restore-StorageGroupCopy -Identity:SG1

若要確保您目前閱讀的是最新資訊,並尋找其他的 Exchange Server 2007 說明文件,請造訪 Exchange Server 技術資源中心.