PowerShell script exchange
Post Reply
mkub
Novice
Posts: 6
Liked: never
Joined: Nov 07, 2024 10:18 am
Contact:

Wrong session progress returned by Get-VBRSession

Post by mkub »

Hello

I'm using VBR 12 with powershell to start a D2T job after an site2site Copyjob.
Currently I'm only checking if there are running jobs, but as an optimization I want to check if these jobs are really active copy jobs (or only idle and waiting for resources) before starting the tape job.
With the following lines

$lastsess = Get-VBRSession -Last -Job $copyjob
$lastsess.Progress

I'm getting a wrong value in the progress field in $lastsess.Progress. I'm getting the values 0 or 100 but nothing between. In the GUI the progress is showing up correctly (between 0 and 100), but there are also some jobs where PS says 100 and GUI says 0.

Is this a known bug or does anyone know whats wrong?

Thanks!
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Wrong session progress returned by Get-VBRSession

Post by david.domask »

Hi mkub, welcome to the forums.

Few quick questions:

1. Can you show the type for $copyjob object? ( $copyjob.GetType() )
2. Can you check the progress property from a Get-VBRBackupSession object?

$lastsess = Get-VBRSession -Last -Job $copyjob
$fullSess = Get-VBRBackupSession -Id $lastsess.id
$fullSess.Progress

Does it return correctly?
David Domask | Product Management: Principal Analyst
mkub
Novice
Posts: 6
Liked: never
Joined: Nov 07, 2024 10:18 am
Contact:

Re: Wrong session progress returned by Get-VBRSession

Post by mkub »

Hello david!

$copyjob.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False VBRBackupCopyJob Veeam.Backup.PowerShell.Infos.VBRJob

$fullSess.Progress.Percents is also showing only 0 or 100 :-(
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Wrong session progress returned by Get-VBRSession

Post by david.domask »

I will check on this in my lab, this looks to be about the fact that Backup Copies start child worker sessions for each source added, and will check on the behavior you're seeing.

Just a few questions about the general scenario however:

1. Is there a reason you're preferring to manage this with Powershell as opposed to allowing the built-in scheduler handle the processing?
2. Veeam automatically handles the resource allocation and will queue tasks when there are no available task slots; that is, if the tape job starts while the Backup Copy is still busy with the same backup files, the tape job tasks will queue and be started once the backup files are released/there is available task slot

I guess mostly just trying to understand why this is needed in your workflow, and if you could elaborate a bit, can provide better guidance.
David Domask | Product Management: Principal Analyst
mkub
Novice
Posts: 6
Liked: never
Joined: Nov 07, 2024 10:18 am
Contact:

Re: Wrong session progress returned by Get-VBRSession

Post by mkub »

Thanks, I'm waiting for your test results.
The reason why we do this manually is the following: We've attached a automatic changer and we've 4 repos with about 20 tapes per week. We backup every repo at once (full), if there are no copyjobs active, with VSS. After all 4 tape jobs are completed we do rotate the entire set of tapes manually (one full backup per week, once per week). We do not have enough space or tape drives to do incremental backups.
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Wrong session progress returned by Get-VBRSession

Post by david.domask »

Hi mkub,

You're welcome, and will await the results.

As for your workflow, do I understand correctly you're doing a File to Tape job that only gets VBK files? Or can you explain a bit more.

If the goal is to have a full archive on tape weekly, Tape GFS Media Pools might suit better here and you can avoid having to script entirely as Veeam will ensure there are no lock conflicts and queue tasks if there's a lock conflict.

That would save you a lot of time and planning with scripting.
David Domask | Product Management: Principal Analyst
mkub
Novice
Posts: 6
Liked: never
Joined: Nov 07, 2024 10:18 am
Contact:

Re: Wrong session progress returned by Get-VBRSession

Post by mkub »

Yes, our current workflow is that we do a full backup with 14 deltas (vbk & vib) at the copy site to tape.
Currently we don't want to change our script.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests