-
- Veteran
- Posts: 257
- Liked: 40 times
- Joined: May 21, 2013 9:08 pm
- Full Name: Alan Wells
- Contact:
Possible PowerShell Command Issue
Can I have some folks test this for me to see if it is just me or a global issue.
This is using B&R v9.5 U1. It worked in 9.0 before I upgraded.
Create 2 Tape Jobs. Assign them both to the same Standard Media Pool
Change the second job to start after the first job.
Use the following command to change the media pool to a different pool on the second job.
Tell me if your chain is now broken. It breaks the chain on all of my jobs and I have tested several times.
Set-VBRBackupToTapeJob -Job "INSERT JOB NAME" -FullBackupMediaPool "INSERT NEW MEDIA POOL NAME"
This is using B&R v9.5 U1. It worked in 9.0 before I upgraded.
Create 2 Tape Jobs. Assign them both to the same Standard Media Pool
Change the second job to start after the first job.
Use the following command to change the media pool to a different pool on the second job.
Tell me if your chain is now broken. It breaks the chain on all of my jobs and I have tested several times.
Set-VBRBackupToTapeJob -Job "INSERT JOB NAME" -FullBackupMediaPool "INSERT NEW MEDIA POOL NAME"
-
- Veteran
- Posts: 257
- Liked: 40 times
- Joined: May 21, 2013 9:08 pm
- Full Name: Alan Wells
- Contact:
Re: Possible PowerShell Command Issue
I just tested this on a Dev B&R server. Same result.
The console view of the job changes so that the Next Run column only shows After {}
If you edit the job the schedule to start After this job shows the first job alphabetically in the All jobs listing.
You can change it back to the original another setting and that puts it back but will lose the setting if the command is run again.
Case # 02059900 has been submitted
The console view of the job changes so that the Next Run column only shows After {}
If you edit the job the schedule to start After this job shows the first job alphabetically in the All jobs listing.
You can change it back to the original another setting and that puts it back but will lose the setting if the command is run again.
Case # 02059900 has been submitted
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
I've just confirmed the experienced behaviour in my lab. We're investigating this internally, will let you know once I have more information.
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
This has been tracked as a bug. We're planning to fix in Update 2. Thank you for raising this issue; appreciated.
-
- Enthusiast
- Posts: 45
- Liked: 5 times
- Joined: Feb 15, 2017 9:51 am
- Contact:
[MERGED] Set tape job schedule
I'm trying to configure a tape job to run on the first Saturday of every month at 9:00PM. I'm after the following settings.
I've tried the following commands. Neither of them work. Both sets run perfectly fine without any errors.
and also
Any help would be greatly appreciated. I'm using 9.5 U1.
I've tried the following commands. Neither of them work. Both sets run perfectly fine without any errors.
Code: Select all
$TapeMonthlyOption = New-VBRMonthlyOptions -DayOfWeek Saturday -DayNumberInMonth First -Period '21:00'
$TapeSchedule = New-VBRBackupToTapeScheduleOptions -MonthlyOptions $TapeMonthlyOption -Enabled
$TapeJob | Set-VBRBackupToTapeJob -ScheduleOptions $TapeSchedule
Code: Select all
$TapeJob | Set-VBRJobSchedule -Monthly -At '21:00' -NumberInMonth First -Days Saturday | Enable-VBRJobSchedule
-
- Enthusiast
- Posts: 45
- Liked: 5 times
- Joined: Feb 15, 2017 9:51 am
- Contact:
Set tape job to run after backup job
I'm trying to configure a tape job to run after a backup job. The commands run without any errors but I noticed in the console the "Next run" is '[]' and doesn't specify the job that it will run after. However, if I manually edit the tape job and set it to run after a backup job, "Next run" correctly shows the backup job in the console. Is there another command I'm supposed to be using to update the console?
Any help would be greatly appreciated. I'm using 9.5 U1.
Code: Select all
$TapeSchedule = New-VBRBackupToTapeScheduleOptions -Type AfterJob -Job $Job -Enabled
$TapeJob | Set-VBRBackupToTapeJob -ScheduleOptions $TapeSchedule
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
Looks like both reported issues are related to the known problem mentioned above. Kindly, wait till Update 2 is released. Thanks.
-
- Enthusiast
- Posts: 45
- Liked: 5 times
- Joined: Feb 15, 2017 9:51 am
- Contact:
Re: Possible PowerShell Command Issue
Thanks for confirming v.Eremin. Looking forward to Update 2.
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
I will most likely update this thread, once the it's released. So, stay tuned.
-
- Enthusiast
- Posts: 45
- Liked: 5 times
- Joined: Feb 15, 2017 9:51 am
- Contact:
Re: Possible PowerShell Command Issue
Just something else to add to the list, looks like many of the Tape powershell cmdlets are broken.
1. -AlwaysCopyFromLatestFull in Add-VBRBackupToTapeJob does not enable "Process latest full backup chain only" on the job.
2. Set-VBRBackupToTapeJob -JobScriptOptions $ScriptOptions seems to 'reset' some scheduled options. Can't remember exactly would options would go to factory settings.
1. -AlwaysCopyFromLatestFull in Add-VBRBackupToTapeJob does not enable "Process latest full backup chain only" on the job.
2. Set-VBRBackupToTapeJob -JobScriptOptions $ScriptOptions seems to 'reset' some scheduled options. Can't remember exactly would options would go to factory settings.
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
I was not able to reproduce that on 9.5 Update 1.1. -AlwaysCopyFromLatestFull in Add-VBRBackupToTapeJob does not enable "Process latest full backup chain only" on the job.
This issue is similar to the ones mentioned previously (Set-VBRBackupToTapeJob resets the specified schedule). It's planned to be addressed in Update 2.2. Set-VBRBackupToTapeJob -JobScriptOptions $ScriptOptions seems to 'reset' some scheduled options. Can't remember exactly would options would go to factory settings.
-
- Enthusiast
- Posts: 45
- Liked: 5 times
- Joined: Feb 15, 2017 9:51 am
- Contact:
Re: Possible PowerShell Command Issue
Thanks for the reply v.Eremin. Regarding issues 1.
I cannot get the option enabled. Maybe it breaks when using a combination of other parameters? Here is my exact code below.
I cannot get the option enabled. Maybe it breaks when using a combination of other parameters? Here is my exact code below.
Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn
$TapePool = 'Onsite Tapes'
$JobList = Get-VBRJob | Where-Object -FilterScript { $PSItem.JobTargetType -eq 'Backup' }
foreach ($Job in $JobList)
{
if ($null -eq (Get-VBRTapeJob -Name "$TapePool - $($Job.Name)" -ErrorAction SilentlyContinue))
{
Write-Host -Object "`nCreating tape job: $TapePool - $($Job.Name)"
Write-host -Object "$TapePool - $($Job.Name): Adding $($Job.Name)"
# Create Tape Job and add backup job
$Mediapool = Get-VBRTapeMediaPool -Name $TapePool
$TapeJob = Add-VBRBackupToTapeJob -Name "$TapePool - $($Job.Name)" -Object $Job -FullBackupMediaPool $Mediapool -ProcessIncrementalBackup -IncrementalBackupMediaPool $Mediapool -ExportDays Friday -AlwaysCopyFromLatestFull
# Configure Tape Job to start after backup job
$TapeSchedule = New-VBRBackupToTapeScheduleOptions -Type AfterJob -Job $Job -Enabled
$TapeJob | Set-VBRBackupToTapeJob -ScheduleOptions $TapeSchedule
}
}
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
Before we dig deep into the code, can you tell what product version is in use?
-
- Enthusiast
- Posts: 45
- Liked: 5 times
- Joined: Feb 15, 2017 9:51 am
- Contact:
Re: Possible PowerShell Command Issue
I'm using using 9.5 U1.
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
Last call of Set-VBRBackupToTapeJob seems to erase the said setting. So, in order to be of the safe side use it along with -IncrementalBackupMediaPool parameter. Thanks.
-
- Enthusiast
- Posts: 45
- Liked: 5 times
- Joined: Feb 15, 2017 9:51 am
- Contact:
Re: Possible PowerShell Command Issue
Thanks v.Eremin I managed to get it working. I've included the modified code below in case anyone else has the issue.
Would you like me to open a case for this bug or will it be fixed along with the rest of the tape cmdlet fixes?
Would you like me to open a case for this bug or will it be fixed along with the rest of the tape cmdlet fixes?
Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn
$TapePool = 'Onsite Tapes'
$JobList = Get-VBRJob | Where-Object -FilterScript { $PSItem.JobTargetType -eq 'Backup' }
foreach ($Job in $JobList)
{
if ($null -eq (Get-VBRTapeJob -Name "$TapePool - $($Job.Name)" -ErrorAction SilentlyContinue))
{
Write-Host -Object "`nCreating tape job: $TapePool - $($Job.Name)"
Write-host -Object "$TapePool - $($Job.Name): Adding $($Job.Name)"
# Create Tape Job and add backup job
$Mediapool = Get-VBRTapeMediaPool -Name $TapePool
$TapeJob = Add-VBRBackupToTapeJob -Name "$TapePool - $($Job.Name)" -Object $Job -FullBackupMediaPool $Mediapool -ProcessIncrementalBackup -IncrementalBackupMediaPool $Mediapool -ExportDays Friday -AlwaysCopyFromLatestFull
# Configure Tape Job to start after backup job
$TapeSchedule = New-VBRBackupToTapeScheduleOptions -Type AfterJob -Job $Job -Enabled
# AlwaysCopyFromLastestFull used here again because Set-VBRBackupToTapeJob clears the option
$TapeJob | Set-VBRBackupToTapeJob -ScheduleOptions $TapeSchedule -AlwaysCopyFromLatestFull
}
}
-
- Product Manager
- Posts: 20389
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Possible PowerShell Command Issue
It seems to be a general problem with Set-VBRBackupToTape job that this cmdlet resets all settings besides those that are specified. We're well aware of this issue and going to address it in one of the next product releases. Thanks.
-
- Enthusiast
- Posts: 67
- Liked: 6 times
- Joined: Aug 07, 2015 8:45 pm
- Full Name: David Engler
- Contact:
[MERGED] Adding job to tape job is changing schedule
I'm attempting to add a Backup job to an existing tape job and when I use the code below its changing the job schedule to be After a Backup Job
I don't want this script to change the schedule, it just needs to add a new Backup Job.
The job it added happened to be the first one when sorted alphabetically
The results are the same with or without adding the $SchedOptions object to Set-VBRBackupToTapeJob
Dave
$TapeJob = Get-VBRTapeJob -Name <My Job Name>
$NewJob = Get-VBRJob -Name <Job to Add>
$NewObject = $TapeJob.Object
$NewObject += $NewJob
$SchedOptions = $TapeJob.ScheduleOptions
Set-VBRBackupToTapeJob -Job $TapeJob -Object $NewObject -ScheduleOptions $SchedOptions
I don't want this script to change the schedule, it just needs to add a new Backup Job.
The job it added happened to be the first one when sorted alphabetically
The results are the same with or without adding the $SchedOptions object to Set-VBRBackupToTapeJob
Dave
$TapeJob = Get-VBRTapeJob -Name <My Job Name>
$NewJob = Get-VBRJob -Name <Job to Add>
$NewObject = $TapeJob.Object
$NewObject += $NewJob
$SchedOptions = $TapeJob.ScheduleOptions
Set-VBRBackupToTapeJob -Job $TapeJob -Object $NewObject -ScheduleOptions $SchedOptions
Who is online
Users browsing this forum: No registered users and 15 guests