Restoring multiple files with Guest files (Linux)

PowerShell script exchange

Restoring multiple files with Guest files (Linux)

Veeam Logoby Jocelyn32 » Tue May 09, 2017 2:11 pm

Hello,

I would like to transfer (restore) files from one backup to another server.
These are RedHat servers
Here is the beginning of my script:

Can you help me understand how to specify which files I want to restore?
And how do you choose to restore to another server?

Thank You !
Jocelyn32
Novice
 
Posts: 5
Liked: 1 time
Joined: Tue Mar 22, 2016 8:49 am

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby Jocelyn32 » Wed May 10, 2017 7:03 am

Sorry I have forget the start code :

Code: Select all
$esx = Get-VBRServer -Name "esx3.local"
Find-VBRViResourcePool -Server $esx
$resourcepool = Get-VBRServer -Name "esx3.local" | Find-VBRViResourcePool
$targetnetwork = Get-VBRViServerNetworkInfo -Server "esx3.local" | Where-Object { $_.NetworkName -eq "Default_VLAN" }
$restorepoint = Get-VBRBackup -Name "VM_Linux" | Get-VBRRestorePoint -Name "Oracle" | Sort Creationtime -Descending | Select -First 1
Jocelyn32
Novice
 
Posts: 5
Liked: 1 time
Joined: Tue Mar 22, 2016 8:49 am

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby v.Eremin » Thu May 11, 2017 7:05 pm

I think this is the algorithm you should script:

- Power on Linux FLR appliance, using the code provided (Veeam PS)
- Enable FTP access to the restored file system (Veeam PS)
- Copy and paste files from disk mounted to the appliance, using whatever 3-party tool (supporting FTP) that you want to (3-party tool)


Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby Jocelyn32 » Fri May 12, 2017 3:22 pm

Thanks !

Do you have an example to enable ftp access ?
Jocelyn32
Novice
 
Posts: 5
Liked: 1 time
Joined: Tue Mar 22, 2016 8:49 am

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby v.Eremin » Fri May 12, 2017 4:17 pm

Yep, it's -EnableFTP switch that does that. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby tsightler » Fri May 12, 2017 5:24 pm

Note that you can also use SCP and or Rsync, but you will need to know the password for the appliance, which you can set in credentials manager, or via Powershell.
tsightler
Veeam Software
 
Posts: 4768
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby Jocelyn32 » Mon May 15, 2017 7:21 am

Thanks !

I start the tests but how to have a fixed ip with the virtual lab ?
Jocelyn32
Novice
 
Posts: 5
Liked: 1 time
Joined: Tue Mar 22, 2016 8:49 am

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby v.Eremin » Mon May 15, 2017 8:14 pm

You can set a static IP for Linux FLR appliance once, using either this wizard or -IPAddress parameter of Start-VBRLinuxFilerRestore cmdlet, and leverage it as a connection point afterwards. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Restoring multiple files with Guest files (Linux)

Veeam Logoby Jocelyn32 » Mon May 22, 2017 4:03 pm 1 person likes this post

Thanks, I will wait for the next request from the developers for a real test.

So I use two scripts:
A powershell script to start LFR
A bash script to transfer my files to FTP

Code: Select all
Add-PsSnapIn VeeamPSSnapIn -ErrorAction SilentlyContinue
$esx = Get-VBRServer -Name "esx3.local"
Find-VBRViResourcePool -Server $esx
$resourcepool = Get-VBRServer -Name "esx3.local" | Find-VBRViResourcePool
$targetnetwork = Get-VBRViServerNetworkInfo -Server "esx3.local" | Where-Object { $_.NetworkName -eq "Default_VLAN" }
$restorepoint = Get-VBRBackup -Name "VM_Linux" | Get-VBRRestorePoint -Name "Oracle" | Sort Creationtime -Descending | Select -First 1
$ipaddress = "192.168.1.24"
$networkmask = "255.255.255.0"
$gateway = "192.168.1.254"

$linuxflr = Start-VBRLinuxFileRestore -RestorePoint $restorepoint -Server $esx -ResourcePool $resourcepool -NetworkInfo $targetnetwork -IP $ipaddress -NetworkMask $networkmask -Gateway $gateway -EnableFTP


Code: Select all
#!/bin/sh

ftp -n 10.20.1.24
user root password
lcd /home/oracle/oracle11/oradata/gnx/
cd /VG_0-LV_home/oracle/oracle11/oradata/gnx
prompt
bin
get redo1.log
get redo2.log
get CONTROL03.CTL
bye
Jocelyn32
Novice
 
Posts: 5
Liked: 1 time
Joined: Tue Mar 22, 2016 8:49 am


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests