Backup-SCVMMServer

Backup-SCVMMServer

Backs up the VMM database.

構文

Parameter Set: Default
Backup-SCVMMServer -Path <String> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

詳細説明

The Backup-SCVMMServer cmdlet backs up the Virtual Machine Manager (VMM) database on a VMM server to a local folder or to a remote network share. The folder to which you back up the database must be accessible to the SQL Server.

To determine whether the VMM database is stored locally or on a remote server running Microsoft SQL Server, do the following.

-- On the VMM server, open the Registry Editor.
-- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\Sql
-- Examine the value for OnRemoteServer:
---- If it is set to 0, the database is on the local VMM server.
---- If it is set to 1, the database is on a remote SQL server.

After you use the Backup-SCVMMServer cmdlet to back up the VMM database, as demonstrated in Examples 1 and 2, you can use the SCVMMRecover.exe command to restore the database, as demonstrated in Example 3. This command is installed with VMM. This command is not a Windows PowerShell cmdlet. By default, SCVMMRecover.exe is installed in <%system-drive%>\Program Files\Microsoft System Center 2012\Virtual Machine Manager\bin.

IMPORTANT: To back up and restore a server functioning as a virtual machine host or as a library server in a VMM environment, use your standard server backup and restore procedures.

パラメーター

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Path<String>

Specifies the destination path for the operation.

Example formats:

Local: -Path "F:\"

UNC: -Path "\\Library\Templates"

Volume GUID: -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"

VMware ESX: -Path "[storage1]\MyVMwareFolderForVMs\MyVM.vmx"

Citrix XenServer: -Path "Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]"

Wildcards are supported for Get- cmdlets and when you specify the UNC path.

Example format:

UNC: -Path "\\VMHostServer\MyVMs\*VM*"

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • VMMServer

Example 1: Back up the VMM database to a local folder

This command backs up the VMM database on the VMM server named VMMServer01 to the specified path.

Note:

-- This cmdlet must back up the database to a server running Microsoft SQL Server. This example assumes that Microsoft SQL Server for the VMM database is installed on VMMServer01 rather than on a remote server.
-- When you back up the database to a local folder, the folder must be write-accessible to the Microsoft SQL Server service.

PS C:\> Backup-SCVMMServer -VMMServer "VMMServer01.Contoso.com" -Path "D:\VMMBackups"

Example 2: Back up the VMM database to a network share

This command backs up the VMM database on the VMM server named VMMServer01 to the specified share on a server called SQLServer01.

Important:

-- This cmdlet must back up the database to a server running Microsoft SQL Server, so this example assumes that Microsoft SQL Server for the VMM database is installed on SQLServer01.
-- When you back up the database to a remote share, the share must be write-accessible to the Microsoft SQL Server service.

PS C:\> Backup-SCVMMServer -VMMServer "VMMServer01.Contoso.com" -Path "\\SQLServer01\VMMBackups"

Example Example 3: Restore the VMM database.

This example demonstrates the use of SCVMMRecover.exe. This is not a Windows PowerShell cmdlet. You must open a Command Prompt window, not a Windows PowerShell session, and use the SCVMMRecover.exe command that is installed with VMM to perform this operation. You must run SCVMMRecover.exe locally on the VMM server on which you want to restore the database. SCVMMRecover.exe does not work with a highly available VMM installation.

This example restores the VMM database to the VMM server where:

<%backup-folder-path%> is the path on the server running Microsoft SQL Server where the .bak file is saved.

<%backup-file-name%> is the name of the .bak file that was created during the backup operation.

This example assumes that SCVMMRecover.exe is installed in the default location for VMM at:

<%system-drive%>\Program Files\Microsoft System Center 2012\Virtual Machine Manager\bin\SCVMMRecover.exe

C:\> SCVMMRecover.exe -Path <%backup-folder-path%>\<%backup-file-name%>.bak -Confirm

関連トピック

Get-SCVMMServer

Set-SCVMMServer