PowerShell script exchange
Post Reply
controlfreak
Enthusiast
Posts: 59
Liked: 12 times
Joined: Jan 12, 2018 11:20 pm
Full Name: Control
Location: Washington, USA
Contact:

Method for changing backup repository on existing job

Post by controlfreak »

Does anyone know of a way to change the backup repository configured in a Veeam backup job? I am moving the backup files to the new repository using robocopy. I would prefer not to copy the existing job.

This is a really easy change to make in the gui, but I have a lot of jobs to modify.

Thanks,

Control
chris.arceneaux
VeeaMVP
Posts: 695
Liked: 374 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Method for changing backup repository on existing job

Post by chris.arceneaux »

Supported method for performing this in PowerShell is:
  • copy the files (you've already got this)
  • clone the job specifying the new repository
There is more information surrounding this in the threads below:
Here's also some sample code:

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
You can also set name and descriptions of the newly copied job as well per Veeam documentation.
controlfreak
Enthusiast
Posts: 59
Liked: 12 times
Joined: Jan 12, 2018 11:20 pm
Full Name: Control
Location: Washington, USA
Contact:

Re: Method for changing backup repository on existing job

Post by controlfreak »

Thank you Chris!
chris.arceneaux
VeeaMVP
Posts: 695
Liked: 374 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Method for changing backup repository on existing job

Post by chris.arceneaux »

No problem. Glad to help!
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests