Copy-VBRLinuxGuestItem

Short Description

Copies Linux-based or Unix-based guest OS files to the target host.

Important

This cmdlet is available starting from Veeam Backup & Replication 11a (build 11.0.1.1261).

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Copy-VBRLinuxGuestItem -Item <VBRFLRFsItem[]> -LinuxFlrObject <VBRLinuxFlrObject> -Server <CHost> -TargetFolder <string> [-Datastore <VBRViDatastoreBase>] [-KeepPermissionsAndOwnership]  [<CommonParameters>]

Detailed Description

This cmdlet copies Linux-based or Unix-based guest OS files to the target host. You can use the following types of servers and hosts as the target hosts:

  • Microsoft Windows Server
  • Linux Server
  • VMware vSphere Server
  • VMware vCloud Director

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Item

Specifies an array of files and folders that are available on disks of Linux-based or Unix-based machines. The cmdlet will copy these files and folders.

Accepts the VBRFLRFsItem[] object. To create this object, run the Get-VBRLinuxGuestItem cmdlet.

True

Named

True (ByValue,
ByProperty
Name)

LinuxFlrObject

Specifies a restore session of Linux-based or Unix-based guest OS files. The cmdlet will use this session to copy guest OS files.

Accepts the VBRLinuxFlrObject object. To create this object, run the Start-VBRLinuxFileRestore cmdlet.

True

Named

False

Server

Specifies a target machine to which you want to copy guest OS files.

Accepts the CHost object. To create this object, run the Get-VBRServer cmdlet.

True

Named

False

TargetFolder

Specifies a folder in the target machine. The cmdlet will copy the guest OS files to this folder.

String

True

Named

False

Datastore

Specifies the datastore where the target machine will be located. The cmdlet will copy the guest OS files to the machine located in this datastore.

Accepts the VBRViDatastoreBase object. To create this object, run the Find-VBRViDatastore cmdlet.

 

 

 

KeepPermissionsAndOwnership

Defines that the cmdlet will keep custom permissions and the ownership of the copied guest OS files.

If you do not provide this parameter, the cmdlet will restore guest OS files with default permissions and ownership.

Defatult: False.

SwitchParameter

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Output Object

None.

Examples

Copying Linux-Based or Unix-Based Guest OS Files to Target Host

This example shows how to copy files from the UbuntuSrv to the LinSrv07 target machine.

$backup = Get-VBRBackup -Name "UbuntuSrv"

$restorepoint = Get-VBRRestorePoint -Backup $backup

$session = Start-VBRLinuxFileRestore -RestorePoint $restorepoint -MountServer $server

$items = Get-VBRLinuxGuestItem -FlrObject $session

$targetserver = Get-VBRServer -Name "LinSrv07"

Copy-VBRLinuxGuestItem -Item $items -FlrObject $session -TargetFolder "/home/pictures" -Server $targetserver

Perform the following steps:

  1. Start the restore session:
  1. Run the Get-VBRBackup cmdlet. Specify the Name parameter value. Save the result to the $backup variable
  2. Run the Get-VBRRestorePoint cmdlet. Specify the Backup parameter value. Save the result to the $restorepoint variable.
  3. Run the Get-VBRServer cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  1. Run the Start-VBRLinuxFileRestore cmdlet. Specify the RestorePoint and MountServer parameter values. Save the result to the $session variable.
  1. Run the Get-VBRLinuxGuestItem cmdlet. Specify the FlrObject parameter value. Save the result to the $items variable.
  2. Run the Get-VBRServer cmdlet. Specify the Name parameter value. Save the result to the $targetserver variable.
  1. Run the Copy-VBRLinuxGuestItem cmdlet. Specify the following settings:
  • Set the $items variable as the Item parameter value.
  • Set the $session variable as the FlrObject parameter value.
  • Specify the TargetFolder parameter value.
  • Set the $targetserver variable as the Server parameter value.

Related Commands