Solved

Start-VBRLinuxFileRestore file from a backup dir in linux


Userlevel 1
  • Not a newbie anymore
  • 2 comments

Hi,

Need a little help here with Start-VBRLinuxFileRestore. I have a daily backup of /home and backing up to a linux repo. I need to restore a file and i am at lost with the use of the powershell. Here’s my test per line below

 

PS C:\Scripts> $backup = Get-VBRBackup -Name "RedhatDirectoryJob"
PS C:\Scripts> $restorepoint = Get-VBRRestorePoint -Backup $backup
PS C:\Scripts> $server = Get-VBRServer -Name "192.168.1.200"
PS C:\Scripts> $session = Get-VBRRestorePoint -Backup $backup | Sort-Object -Property CreationTime -Descending | Select-Object -First 1

PS C:\Scripts> $root = Get-VBRLinuxGuestItem -LinuxFlrObject $session
Get-VBRLinuxGuestItem : Cannot bind parameter 'LinuxFlrObject'. Cannot convert the "Veeam.Backup.Core.COib" value of type
"Veeam.Backup.Core.COib" to type "Veeam.Backup.PowerShell.Infos.VBRLinuxFlrObject".
At line:1 char:47
+ $root = Get-VBRLinuxGuestItem -LinuxFlrObject $session
+                                               ~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-VBRLinuxGuestItem], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.PowerShell.Cmdlets.GetVBRLinuxGuestItem

PS C:\Scripts>

icon

Best answer by regnor 31 March 2024, 07:44

View original

4 comments

Userlevel 7
Badge +17

Hello @red ,

first of all, you should not share your password here.

 

What exactly is your problem with your code? What is not working? Do you have error messages?

Userlevel 1

Hello @JMeixner ,

I revised it. apologies for that. so here’s my error below

PS C:\Scripts> Get-VBRRestorePoint -Backup $backup | Sort-Object -Property CreationTime -Descending | Select-Object -First 1

VM Name                   Creation Time          Type
-------                   -------------          ----
rhel9.poc.com             3/27/2024 10:50:24 AM  Increment


PS C:\Scripts> $backup = Get-VBRBackup -Name "RedhatDirectoryJob"
PS C:\Scripts> $restorepoint = Get-VBRRestorePoint -Backup $backup
PS C:\Scripts> $server = Get-VBRServer -Name "192.168.1.200"
PS C:\Scripts> $session = Get-VBRRestorePoint -Backup $backup | Sort-Object -Property CreationTime -Descending | Select-Object -First 1

PS C:\Scripts> $root = Get-VBRLinuxGuestItem -LinuxFlrObject $session
Get-VBRLinuxGuestItem : Cannot bind parameter 'LinuxFlrObject'. Cannot convert the "Veeam.Backup.Core.COib" value of type
"Veeam.Backup.Core.COib" to type "Veeam.Backup.PowerShell.Infos.VBRLinuxFlrObject".
At line:1 char:47
+ $root = Get-VBRLinuxGuestItem -LinuxFlrObject $session
+                                               ~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-VBRLinuxGuestItem], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.PowerShell.Cmdlets.GetVBRLinuxGuestItem

PS C:\Scripts> Get-VBRLinuxGuestItem

cmdlet Get-VBRLinuxGuestItem at command pipeline position 1
Supply values for the following parameters:
LinuxFlrObject:

Userlevel 7
Badge +14

The definition of your session object is incorrect. You should have used the 'Start-VBRLinuxFileRestore'. Check this article for examples:

https://helpcenter.veeam.com/docs/backup/powershell/get-vbrlinuxguestitem.html?ver=120#example-1--getting-all-root-items-added-to-linux-based-machine

Userlevel 1

Thanks for the suggestion @regnor! i will try that out.

Comment