Change backup job repository

PowerShell script exchange

Change backup job repository

Veeam Logoby YeinYein » Wed Nov 19, 2014 5:27 pm

Hi Everyone,

I'd like to change the repository of a lot of backup job (more than 150). Indeed, I have a new repository and I want to loadbalance this 2 repository. I don't need to move data, only the Backup Repository of the Job.

I'd like to do it with PowerShell but I cannot find how to do it.

Can you help me ?

Thx
YeinYein
Novice
 
Posts: 5
Liked: never
Joined: Wed Nov 19, 2014 5:20 pm

Re: Change backup job repository

Veeam Logoby v.Eremin » Thu Nov 20, 2014 11:02 am

With GUI, if you don't want to move files, the only available option is to copy existing backup job and change repository afterwards. The situation is the same with PowerShell.

Code: Select all
$Repository = Get-VBRBackupRepository "Name of new repository"
$Job = Get-VBRJob -name "Name of your Backup Job"
Copy-VBRJob -Job $Job -Repository $Repository


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

Re: Change backup job repository

Veeam Logoby HannesK » Wed Jun 14, 2017 6:19 am

I have a customer who is migrating repositories and he likes to script the following:
- copy the backup files to the new repository
- set the job to the new repository

By copy / cloning the job he will loose the job history and the workaround sounds quite strange for him.

Do we have a direct way to set the repository with powershell today?
HannesK
Veeam Software
 
Posts: 1259
Liked: 168 times
Joined: Mon Sep 01, 2014 11:46 am


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests