Start-WBBackup

Windows Server 2012 R2 and Windows 8.1

Start-WBBackup

Starts a one-time backup operation.

구문

Parameter Set: Policy
Start-WBBackup [-Policy] <WBPolicy> [[-Async]] [[-Force]] [[-AllowDeleteOldBackups]] [[-DonotVerifyMedia]] [ <CommonParameters>]




자세한 설명

The Start-WBBackup cmdlet starts a one-time backup operation.

You can use the settings from an existing backup policy for the scheduled backup by specifying a WBPolicy object, or you can start a backup by using new settings. If you use new settings to create a backup, you must do the following:

     -- Specify the items to include in the backup by using the Add-WBVolume, Add-WBFileSpec, Add-WBSystemState, and Add-WBBareMetalRecovery cmdlets.

     -- Specify the location for backup storage by using the locations already defined in a WBBackupTarget object or by updating an object of that type.

Before you can add a backup target to a WBPolicy object, put the WBPolicy object in edit mode. To put the WBPolicy object in edit mode for a policy that you have set as the scheduled backup policy, use the Get-WBPolicy cmdlet with the Editable parameter. The Get-WBPolicy cmdlet creates a new WBPolicy object that is already in edit mode.

To use this cmdlet, you must be a member of the Administrators group or Backup Operators group.

매개 변수

-AllowDeleteOldBackups

If specified, then deleting backups of older versions of the operating system is enabled.


별칭

없음

필수 여부

false

위치

4

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Async

Indicates that Windows PowerShell returns immediately after the backup starts and does not display status messages. If you specify this parameter and choose not to display status messages, you can use the Get-WBJob cmdlet to get the status of the currently running backup operation.


별칭

없음

필수 여부

false

위치

2

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-DonotVerifyMedia

Do not use. This parameter is not implemented in this version of the module.


별칭

없음

필수 여부

false

위치

5

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Force

Indicates that the backup starts automatically without prompting the user for confirmation.


별칭

없음

필수 여부

false

위치

3

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Policy<WBPolicy>

Specifies a WBPolicy object that includes the policy settings for the backup by using an existing backup policy object.


별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(http://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • WBPolicy

    The Start-WBBackup cmdlet uses a WBPolicy object to determine what to include in the backup and where to store the backup.


출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • String

    If you do not specify the Async parameter, the Start-WBBackup cmdlet displays status messages from the currently running backup as strings. If you specify the Async parameter, you can use the Get-WBJob cmdlet to get the status of the currently running backup operation.


예제

Example 1: Start a backup by using new settings

This example starts a backup by using new settings.


 

The first command creates a new backup policy object and stores it in a variable named $Policy.


PS C:\> $Policy = New-WBPolicy

 

The next command creates a backup source, adds the file named "C:\15-12-08_1645.jpg" to the backup source, and stores the backup source in a variable named $FileSpec.


PS C:\> $FileSpec = New-WBFileSpec -FileSpec C:\15-12-08_1645.jpg

 

This command associates the backup source in the $FileSpec variable with the backup policy in the $Policy variable.


PS C:\> Add-WBFileSpec -Policy $Policy -FileSpec $FileSpec

 

This command stores the volume that has the drive letter F: in the variable named $Volume.


PS C:\> $Volume = Get-WBVolume -VolumePath F:

 

This command stores the volume in the $Volume variable in the backup policy in the $Policy variable.


PS C:\> Add-WBVolume -Policy $Policy -Volume $Volume

 

This command adds the current system state options to the backup policy in the $Policy variable.


PS C:\> Add-WBSystemState $Policy

 

This command adds the ability to perform a bare-metal recovery to the backup policy in the $Policy variable.


PS C:\> Add-WBBareMetalRecovery $Policy

 

This command creates a new backup location object that contains the volume that has the drive letter D: and then stores that object in the $BackupLocation variable.


PS C:\> $BackupLocation = New-WBBackupTarget -VolumePath D:

 

This command adds the backup target based on the backup policy in the $Policy variable and the backup location in the $BackupLocation variable.


PS C:\> Add-WBBackupTarget -Policy $Policy -Target $BackupLocation

 

This command specifies that the backup policy in the $Policy variable uses Volume Shadow Copy Service (VSS) copy backups.


PS C:\> Set-WBVssBackupOptions -Policy $Policy -VssCopyBackup

 

This command starts the backup by using the backup policy in the $Policy variable.


PS C:\> Start-WBBackup -Policy $Policy

Example 2: Start a backup by using backup policy settings

This example starts a backup by using the settings for scheduled backups defined in a backup policy.

The first command gets the current backup policy and stores it in the variable named $Policy.

The second command starts the backup. Because the command specifies the Async parameter, the cmdlet returns immediately.

The third command gets the backup status and stores it in the variable named $BackupJob. Because the second command includes the Async parameter, you can view the backup status by using the Get-WBJob cmdlet.


PS C:\> $Policy = Get-WBPolicy
PS C:\> Start-WBBackup -Policy $policy -Async
PS C:\> $BackupJob = Get-WBJob

관련 항목

커뮤니티 추가 항목

추가
표시: