Copy-VBRLinuxGuestItem

Short Description

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

Applies to

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

Syntax

Copy-VBRLinuxGuestItem -Item <VBRFLRFsItem[]> -LinuxFlrObject <VBRLinuxFlrObject> -Server <CHost> -ShareCredentials <PSCredential> -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 Cloud Director Server

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

ShareCredentials

For copying guest OS files to a shared folder.

Specifies credentials that you want to use to authenticate with the target shared folder to which you copy guest OS files.

Accepts the PSCredential object. To create this object, run the Get-Credential cmdlet.

False

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.

False

Named

False

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.

Default: False.

SwitchParameter

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see 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

$server = Get-VBRServer -Name "LinSrv05"

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

$items = Get-VBRLinuxGuestItem -LinuxFlrObject $session

$targetserver = Get-VBRServer -Name "LinSrv07"

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

Perform the following steps:

  1. Start the restore session:
  • Run the Get-VBRBackup cmdlet. Specify the Name parameter value. Save the result to the $backup variable.
  • Run the Get-VBRRestorePoint cmdlet. Set the $backup variable as the Backup parameter value. Save the result to the $restorepoint variable.
  • Run the Get-VBRServer cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  • Run the Start-VBRLinuxFileRestore cmdlet. Set the $restorepoint variable as the RestorePoint parameter value. Set the $server variable as the MountServer parameter value. Save the result to the $session variable.
  1. Run the Get-VBRLinuxGuestItem cmdlet. Set the $session variable as the LinuxFlrObject 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.
  3. Run the Copy-VBRLinuxGuestItem cmdlet. Specify the following settings:
  • Set the $items variable as the Item parameter value.
  • Set the $session variable as the LinuxFlrObject parameter value.
  • Specify the TargetFolder parameter value.
  • Set the $targetserver variable as the Server parameter value.

Related Commands

Page updated 2/5/2024

Page content applies to build 12.3.0.310