New-WBBackupTarget

Windows Server 2012 R2 and Windows 8.1

New-WBBackupTarget

Creates a backup target object.

구문

Parameter Set: Disk
New-WBBackupTarget [-Disk] <WBDisk> [[-Label] <String> ] [[-PreserveExistingBackups] <Boolean> ] [ <CommonParameters>]

Parameter Set: NetworkWithPSCred
New-WBBackupTarget [-NetworkPath] <String> [[-Credential] <PSCredential> ] [[-NonInheritAcl]] [ <CommonParameters>]

Parameter Set: RemovableDrive
New-WBBackupTarget [-RemovableDrive] <String> [ <CommonParameters>]

Parameter Set: Volume
New-WBBackupTarget [-Volume] <WBVolume> [ <CommonParameters>]

Parameter Set: VolumePath
New-WBBackupTarget [-VolumePath] <String> [ <CommonParameters>]




자세한 설명

The New-WBBackupTarget cmdlet creates a backup target object for Windows Server Backup. The backup target object defines the locations where the server stores backups.

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

매개 변수

-Credential<PSCredential>

Specifies a PSCredential object that contains the user name and password for a user account that has access permissions for a location where the server stores backups.


별칭

없음

필수 여부

false

위치

2

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-Disk<WBDisk>

Specifies a WBDisk object that contains the disk where the server stores backups.

Use this parameter if the storage location for the backup is a disk. Use the Get-WBDisk cmdlet to see which disks are available, and then use this parameter to specify the disk that you want to use.


별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Label<String>

Specifies a label for the backup storage.


별칭

없음

필수 여부

false

위치

2

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-NetworkPath<String>

Specifies the path to the remote shared folder in which the server stores backups.

Use this parameter if the storage location is a remote shared folder (on a network). You can specify the NonInheritAcl parameter for this type of storage location, but only for one-time backups. You can also use the Credential parameter to specify who can access the backups.


별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-NonInheritAcl

Indicates that the server applies access control list (ACL) permissions for the credentials that the parameter Credential specifies to \\ServerName\ShareName\WindowsImageBackup\ComputerBackedUp\BackupFolder. To access the backup later, you must use these credentials or be a member of the Administrators group or the Backup Operators group on the computer that has the shared folder.

This parameter applies only to one-time backups and not to scheduled backups.

We recommend that you use this parameter to manage permissions for backups. If you do not use this parameter, Windows Server Backup applies the ACL permissions from the remote shared folder to the ComputerBackedUp folder so that anyone who can access the remote shared folder can also access the backup.


별칭

없음

필수 여부

false

위치

3

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-PreserveExistingBackups<Boolean>

Indicates whether the server saves copies of previous backups each time it performs a new backup.

If you save a backup to a remote shared folder, the server overwrites that backup if you use the same folder to back up the same computer again. In addition, if the backup operation fails and the server overwrites the older backup, the newer backup will not be usable. To avoid this situation, specify this parameter, and create subfolders in the remote shared folder to organize your backups. If you do this, the subfolders need twice the space of the parent folder.


별칭

없음

필수 여부

false

위치

3

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-RemovableDrive<String>

Specifies the drive letter of the DVD or removable drive that you use as a backup target. You can back up only whole volumes to this media type, and volume recovery is the only available recovery type. You cannot use this backup location to back up or recover system states, files, Hyper-V virtual servers, or applications.

The server detects a DVD drive as a valid target only if the drive contains a disc.


별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Volume<WBVolume>

Specifies a WBVolume object that contains the volume that stores the backups. To get a WBVolume object, use the Get-WBVolume cmdlet.

Use this parameter if the storage location is a volume. You can get a list of all volumes available by using the Get-WBVolume -Allvolumes cmdlet. Then, choose the WBVolume object for the storage location that you want to use.

This parameter provides the only way that you can specify Universal Naming Convention (UNC) path volumes, which are not mounted, as backup storage locations.


별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-VolumePath<String>

Specifies the drive letter of the volume that stores backups.


별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

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

입력

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

  • NetworkPath string, Disk WBDisk, Volume WBVolume, VolumePath string

    The New-WBBackupTarget cmdlet uses NetworkPath, Disk, Volume, and VolumePath objects to define where the server stores backups. You can specify the Credential parameter to determine who can access the storage location.


출력

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

  • WBBackupTarget

    The New-WBBackupTarget cmdlet creates a WBBackupTarget object, which you can use to configure a backup storage location in a WBPolicy object that contains a backup policy.


예제

Example 1: Use a disk as a backup target

This example creates a WBBackupTarget object that uses the disk labeled Backup Disk 1 as the backup target.

The first command gets the disks that are available for backup storage and stores them in a variable named $Disks.

The second command sets the first disk stored in the $Disks array as the backup target and assigns the label Backup Disk 1 to that disk. The disk is available to store backups only after the server calls the Set-WBPolicy cmdlet and specifies the WBPolicy object to which it added the backup target. You can add multiple storage disks to this backup policy.


PS C:\> $Disks = Get-WBDisk
PS C:\> $DiskBackupLocation = New-WBBackupTarget -Disk $Disks[1] -Label "Backup Disk 1"

Example 2: Use a remote shared folder as a backup target

This example creates a WBBackupTarget object that uses a remote shared folder named \\Server01\BackupStorageLocation as the backup storage location and stores permissions to the credentials in a variable named $Cred. The server needs these credentials to access the shared folder. If you use a remote shared folder, you can add only one backup location to the WBPolicy object that contains the backup policy.

The first command gets credentials and stores them in a variable named $Cred.

The second command specifies the remote shared folder named \\Server01\BackupStorageLocation as the backup target and the credentials in $Cred as the credentials for the operation.


PS C:\> $Cred = Get-Credential
PS C:\> $NetworkBackupLocation = New-WBBackupTarget -NetworkPath \\Server01\BackupStorageLocation -Credential $Cred

Example 3: Specify a volume as a backup target by using a drive letter

This command creates a WBBackupTarget object that uses a volume with drive letter D: as the backup storage location. You can add multiple volumes for storage to the WBPolicy object that contains the backup policy.


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

Example 4: Specify a volume as a backup target by using an array element

This example creates a WBBackupTarget object that uses a volume whose name appears in an array element as the backup storage location. You can add multiple volumes for storage to the WBPolicy object that contains the backup policy.

The first command stores the names of all volumes in an array variable named $VolumeList.

The second command creates the backup target by using the volume name stored in the third element of the $VolumeList array and stores the WBBackupTarget object in the variable named $VolumeBackupLocation.


PS C:\> $VolumeList = Get-WBVolume -AllVolumes
PS C:\> $VolumeBackupLocation = New-WBBackupTarget -Volume $VolumeList[3]

Example 5: Specify a volume as a backup target by using the letter of a removable drive

This command creates a WBBackupTarget object that uses a DVD drive, G:, as the backup storage location and stores the WBBackupTarget object in a variable named $DvdBackupTarget.

You can add only one DVD target as a backup policy to a WBPolicy object that contains a backup policy, and you can specify only volume backup and recovery when you use a DVD as a target type.


PS C:\> $DvdBackupTarget = New-WBBackupTarget -RemovableDrive G:

관련 항목

커뮤니티 추가 항목

추가
표시: