如何備份和還原 Client Access Server

 

適用版本: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007

上次修改主題的時間: 2007-03-26

本主題說明如何使用 Exchange 管理命令介面,備份和還原供 Client Access Server 用於儲存 Microsoft Office Outlook Web Access 虛擬目錄組態資料的 Internet Information Server (IIS) Metabase 資料。

important重要事項:
本主題中包含的指令碼和程序會示範一種可能可用以完成此工作的方式。在生產環境中運用這些技術之前,請先在實驗室環境中加以測試。

開始之前

若要執行下列程序,您使用的帳戶必須已委派 Exchange Server 系統管理員角色及目標伺服器本機 Administrators 群組。如需管理 Microsoft Exchange Server 2007 所需之權限、委派角色以及權利的相關資訊,請參閱權限考量

您必須先在 Exchange \bin 資料夾中建立一個類似下列範例的指令碼,才能執行此還原程序範例:

$ErrorActionPreference = 'stop'
$savedprops = @(
'DirectFileAccessOnPublicComputersEnabled',
'DirectFileAccessOnPrivateComputersEnabled',
'WebReadyDocumentViewingOnPublicComputersEnabled',
'WebReadyDocumentViewingOnPrivateComputersEnabled',
'ForceWebReadyDocumentViewingFirstOnPublicComputers',
'ForceWebReadyDocumentViewingFirstOnPrivateComputers',
'RemoteDocumentsActionForUnknownServers',
'ActionForUnknownFileAndMIMETypes',
'WebReadyFileTypes',
'WebReadyMimeTypes',
'WebReadyDocumentViewingForAllSupportedTypes',
'AllowedFileTypes',
'AllowedMimeTypes',
'ForceSaveFileTypes',
'ForceSaveMimeTypes',
'BlockedFileTypes',
'BlockedMimeTypes',
'RemoteDocumentsAllowedServers',
'RemoteDocumentsBlockedServers',
'RemoteDocumentsInternalDomainSuffixList',
'LogonFormat',
'ClientAuthCleanupLevel',
'DefaultDomain',
'FormsAuthentication',
'BasicAuthentication',
'DigestAuthentication',
'WindowsAuthentication',
'GzipLevel',
'FilterWebBeaconsAndHtmlForms',
'NotificationInterval',
'DefaultTheme',
'UserContextTimeout',
'ExchwebProxyDestination',
'VirtualDirectoryType',
'RedirectToOptimalOWAServer',
'DefaultClientLanguage',
'LogonAndErrorLanguage',
'UseGB18030',
'UseISO885915',
'OutboundCharset',
'CalendarEnabled',
'ContactsEnabled',
'TasksEnabled',
'JournalEnabled',
'NotesEnabled',
'RemindersAndNotificationsEnabled',
'PremiumClientEnabled',
'SpellCheckerEnabled',
'SearchFoldersEnabled',
'SignaturesEnabled',
'ThemeSelectionEnabled',
'JunkEmailEnabled',
'UMIntegrationEnabled',
'WSSAccessOnPublicComputersEnabled',
'WSSAccessOnPrivateComputersEnabled',
'ChangePasswordEnabled',
'UNCAccessOnPublicComputersEnabled',
'UNCAccessOnPrivateComputersEnabled',
'ActiveSyncIntegrationEnabled',
'AllAddressListsEnabled',
'InternalUrl',
'ExternalUrl'
)

$vdir = import-clixml $args[0]

'Recreating "' + $vdir.name + '"' + ' owa version: ' + $vdir.owaversion
if ($vdir.owaversion -eq 'Exchange2007') {
new-owavirtualdirectory -website $vdir.website -internalurl $vdir.internalurl -externalurl $vdir.externalurl
}
else {
new-owavirtualdirectory -website $vdir.website -owaversion $vdir.owaversion -name $vdir.displayname -virtualdirectorytype $vdir.virtualdirectorytype
}
$new = get-owavirtualdirectory $vdir.name
'Restoring properties'
foreach ($prop in $savedprops) {
if ($prop -eq 'ExchwebProxyDestination' -or $prop -eq 'VirtualDirectoryType') {
continue
}
$new.$prop = $vdir.$prop
}
$new | set-owavirtualdirectory
note附註:
在下列程序中,此指令碼會命名為 restorevdir.ps1。

程序

備份 Client Access Server 的 IIS 組態

  • 執行下列 Exchange 管理命令介面命令:

    get-owavirtualdirectory "owa (default web site)" | export-clixml owa.xml -depth 1
    

還原 Client Access Server 的 IIS 組態

  • 執行下列 Exchange 管理命令介面命令:

    restorevdir.ps1 owa.xml
    

相關資訊

如需在 Client Access Server 上需要備份之資料的相關資訊,請參閱 Client Access Server 資料