PowerShell script exchange
Post Reply
smurugun
Veeam ProPartner
Posts: 8
Liked: never
Joined: May 08, 2015 2:48 pm
Full Name: Murugan S
Contact:

Powershell Command to "Map Backup" option

Post by smurugun »

Dear Team,

i was trying to automate the mapping the existing backup chain to the backup job after importing from the Repository. i didn't find the powershell command reference for the same.

Please help me on this.
Thanks,
Murugan. S

jhoughes
Veeam Software
Posts: 194
Liked: 62 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Austin, TX
Contact:

Re: Powershell Command to "Map Backup" option

Post by jhoughes » 2 people like this post

There is not an official PowerShell cmdlet for this function, but it can be done with an unsupported method:

Code: Select all

$SourceBackup = Get-VBRBackup -Name 'SourceBackup'
$BackupJob = Get-VBRJob -Name 'Powershell'
$SourceBackup.Update($BackupJob)
Husband, Father, Solutions Architect, Geek Extraordinaire | @AustinVMUG & @ATXPowerShell leader | VMUG US South Regional Champion | VMware vExpert | Cisco Champion

smurugun
Veeam ProPartner
Posts: 8
Liked: never
Joined: May 08, 2015 2:48 pm
Full Name: Murugan S
Contact:

Re: Powershell Command to "Map Backup" option

Post by smurugun »

Thank you so much Jhoughes. it is working fine.
Thanks,
Murugan. S

PeterStam
Novice
Posts: 8
Liked: never
Joined: Feb 25, 2015 1:49 pm
Full Name: Peter Stam
Contact:

[MERGED] Change target repository on backupjob

Post by PeterStam »

Hi There,

Is it already possible to change the target repository with powershell of a backup job without the need to clone it first? I just want to change the repository when the files already exists on the new target repository.

Regards,
Peter

Egor Yakovlev
Veeam Software
Posts: 1464
Liked: 331 times
Joined: Jun 14, 2013 9:30 am
Full Name: Egor Yakovlev
Contact:

Re: Powershell Command to "Map Backup" option

Post by Egor Yakovlev »

Hi Peter, you are looking for Map Backup option with PowerShell. Please check out answer above.
/Cheers!

PeterStam
Novice
Posts: 8
Liked: never
Joined: Feb 25, 2015 1:49 pm
Full Name: Peter Stam
Contact:

Re: Powershell Command to "Map Backup" option

Post by PeterStam »

Hello Egor,
No i'm not (think so?). I need to change the target repository of a job. How do I specify the target repository then? So from the GUI perspective, the drop down list to select the storage target repository needs to be changed. (please unmerge the post)

I could do a copy-vbrjob, specify the new repository (files copied in advance), remove the old job and rename the copied job to the original name. This seems a little overdone...

Regards,
Peter

jhoughes
Veeam Software
Posts: 194
Liked: 62 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Austin, TX
Contact:

Re: Powershell Command to "Map Backup" option

Post by jhoughes »

The job must be cloned while setting the new backup repository.
Husband, Father, Solutions Architect, Geek Extraordinaire | @AustinVMUG & @ATXPowerShell leader | VMUG US South Regional Champion | VMware vExpert | Cisco Champion

PeterStam
Novice
Posts: 8
Liked: never
Joined: Feb 25, 2015 1:49 pm
Full Name: Peter Stam
Contact:

Re: Powershell Command to "Map Backup" option

Post by PeterStam »

thought so....thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests