PowerShell script exchange
Post Reply
jwz88
Influencer
Posts: 12
Liked: never
Joined: Sep 05, 2014 6:24 am
Contact:

Adding backup-job to backup copy job

Post by jwz88 »

Hi,

I've created a case for this (00627156) and they pointed me to these forums so here we go.
I'd like to add a Backupjob to a Backup Copy Job. But all I can do is add a VM directly to the copy job. Hopefully this functionality can be added.

I'm using the following code for this:

$CJob = Get-VBRJob -Name "$KLANTNAAM"
$Entity = Find-VBRViEntity -VMsAndTemplates -name "$SERVERNAAM"
$CJob.DisableScheduler()
Add-VBRViJobObject -Job $CJob -Entities $Entity
$CJob.EnableScheduler()
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding backup-job to backup copy job

Post by veremin »

You can set a backup job as a source for a backup copy job only during job creation (Add-VBRViBackupCopyJob -BackupJob $Job). Though, you can try to add all VMs that are present in the given backup job to the backup copy job. The latter should start copying data, using restore points created by existing backup job. Thanks.
jwz88
Influencer
Posts: 12
Liked: never
Joined: Sep 05, 2014 6:24 am
Contact:

Re: Adding backup-job to backup copy job

Post by jwz88 »

I will just add an extra machine to the current backup job. I think it would do the trick.

Will extra functionality be added? Don't get why this was left out in the powershell module anyway.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding backup-job to backup copy job

Post by veremin »

The snap-in, as well as, functionality is written by humans, so, overlooks are expected. At least, you have a workaround for now.

As to the extra functionality, I doubt we will add it in the upcoming release, as it's too late to implement any extra stuff.

But thank you for the pointing that out; much appreciated.
jwz88
Influencer
Posts: 12
Liked: never
Joined: Sep 05, 2014 6:24 am
Contact:

Re: Adding backup-job to backup copy job

Post by jwz88 »

Thank you. I do have a sort of workaround, though we do want some jobs with different settings in the copy job.
Will just configure those manually
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding backup-job to backup copy job

Post by veremin »

You can either specify different source backup jobs for them during initial creation (add-vbrvibackupcopyjob) or use the proposed workaround (add VMs included in job). Or you're talking here not about source settings? Thanks.
jwz88
Influencer
Posts: 12
Liked: never
Joined: Sep 05, 2014 6:24 am
Contact:

Re: Adding backup-job to backup copy job

Post by jwz88 »

If I add machines to the Backup Job which gets linked in the copy job. I'd like to have some machines with different settings, but the same settings for backup copy.

I'll just have to wait for a version with a fix for this :)
In the meantime I'll do the workaround and if needed (not so much anyway) i'll adjust manually
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding backup-job to backup copy job

Post by veremin »

jwz88 wrote:If I add machines to the Backup Job which gets linked in the copy job. I'd like to have some machines with different settings, but the same settings for backup copy.
Can you elaborate on this portion, as it's not clear what's the goal you're trying to achieve? Thanks.
jwz88
Influencer
Posts: 12
Liked: never
Joined: Sep 05, 2014 6:24 am
Contact:

Re: Adding backup-job to backup copy job

Post by jwz88 »

When we add a extra machine to a Backup Job it inherits the settings like snapshot amount of the already created backup job.
Sometimes we want different backup settings per machine.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding backup-job to backup copy job

Post by veremin »

Are you talking here about retention settings? If so, you can't apply retention settings on VM level even with GUI. Let alone, PowerShell. Thanks.
jwz88
Influencer
Posts: 12
Liked: never
Joined: Sep 05, 2014 6:24 am
Contact:

Re: Adding backup-job to backup copy job

Post by jwz88 »

Too much confusion going on...

- I have a script which is at the top of the page that I want to create a Backup Job and add that job to the existing Backup Copy Job.
- It is not possible to add a Backup-Job to an existing Backup Copy job so I will add the VM which needs a backup to the existing Backup Job. But this will inherit the settings of the already created, previous job.
tsightler
VP, Product Management
Posts: 6035
Liked: 2860 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Adding backup-job to backup copy job

Post by tsightler »

jwz88 wrote:- I have a script which is at the top of the page that I want to create a Backup Job and add that job to the existing Backup Copy Job.
Sure, makes sense.
jwz88 wrote:- It is not possible to add a Backup-Job to an existing Backup Copy job so I will add the VM which needs a backup to the existing Backup Job. But this will inherit the settings of the already created, previous job.
So why not just create a new Backup Job with whatever settings you need, and then add the VM to the Backup Copy (which I believe is possible). That way the backup job has the settings you need, but the same Backup Copy will still be used.
jwz88
Influencer
Posts: 12
Liked: never
Joined: Sep 05, 2014 6:24 am
Contact:

Re: Adding backup-job to backup copy job

Post by jwz88 »

I thought it mattered if you select backup job or vm in backup copy job (backup job meaning it would select backed up files and with a vm it would make a new backup file), but this is not the case after reading some more in the help files.

Thanks and sorry for the confusion.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Adding backup-job to backup copy job

Post by veremin »

That is not the case, indeed. The difference is whether a backup copy job will take a specific job as a source ("From jobs") or it will walk trough all repositories, trying to find restore points of particular VM(s) ("From infrastructure").

Anyway, glad to hear that you've nailed it. Should other help be needed, don't hesitate to let us know.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests