PowerShell script exchange
Post Reply
Wieland
Lurker
Posts: 2
Liked: never
Joined: Nov 21, 2009 3:13 pm
Full Name: Sebastian Wieland
Contact:

Problem with Start-VBRJob

Post by Wieland »

I'm using the CLI for starting Backupjobs. But on some machines I get the following error:
Start-VBRJob : Value was either too large or too small for an Int32.
At line:1 char:57
+ Get-VBRJob | where {$_.name -eq "EMEAW6"} | Start-VBRJob <<<<
+ CategoryInfo : InvalidOperation: (Veeam.Backup.Po...and.StartVBRJo:StartVBRJob) [Start-VBRJob], Overfl owException
+ FullyQualifiedErrorId :Backup,Veeam.Backup.PowerShell.Command.StartVBRJob
The syntax I use is (EMEAW6 is the servername):

Code: Select all

Get-VBRJob | where {$_.name -eq "EMEAW6"} | Start-VBRJob
However, the Backup is running in the veeam console and finishs successfull.

Thank you for your help,
Sebastian Wieland
Gostev
Chief Product Officer
Posts: 31814
Liked: 7302 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Problem with Start-VBRJob

Post by Gostev »

Hi Sebastian, this issue was reported before, and it is fixed in the next update.
For now, as a workaround please use Start-VBRJob with -runasync key.
omorin
Enthusiast
Posts: 39
Liked: 4 times
Joined: Oct 19, 2010 1:37 pm
Full Name: olivier morin
Location: Bergerac, France
Contact:

Re: Problem with Start-VBRJob

Post by omorin »

Hi, I have the same issue, but i must wait the end of the veeam backup to start other jobs (backup to a LTO) in my cmd script. How can i do that ?
Wieland
Lurker
Posts: 2
Liked: never
Joined: Nov 21, 2009 3:13 pm
Full Name: Sebastian Wieland
Contact:

Re: Problem with Start-VBRJob

Post by Wieland »

I've wrote a little workaround for me:

Code: Select all

Add-PSSnapin VeeamPSSnapIn
$server = "EMEAW6";
$job = Get-VBRJob | where {$_.name -eq $server};
$check = Start-VBRJob $job -runasync;
$job_id= $check.id;
While ($check.State -ne "Stopped")
{
$check=Get-VBRBackupSession | where {$_.id -eq $job_id };
Start-Sleep -s 10;
}
$result=Get-VBRBackupSession | where {$_.id -eq $job_id };
echo $result;
The script starts the job and waits until the job has the status "Stopped". The output is the same than without the runasync parameter
omorin
Enthusiast
Posts: 39
Liked: 4 times
Joined: Oct 19, 2010 1:37 pm
Full Name: olivier morin
Location: Bergerac, France
Contact:

Re: Problem with Start-VBRJob

Post by omorin »

Bonjour !

It just run fine, but what is the meaning of "-runasync" and where can i find the manual of the VBR powershell commands ?
Gostev
Chief Product Officer
Posts: 31814
Liked: 7302 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Problem with Start-VBRJob

Post by Gostev »

-runasync means that PowerShell script execution will continue without waiting for job to finish first.
Manual of PowerShell cmdlets is built-in directly into snap-in, this is described in the User Guide.
omorin
Enthusiast
Posts: 39
Liked: 4 times
Joined: Oct 19, 2010 1:37 pm
Full Name: olivier morin
Location: Bergerac, France
Contact:

Re: Problem with Start-VBRJob

Post by omorin »

When i run this script, i have this error :
11/24/2010 03:33:43 1 0 5000 .NET Runtime 2.0 Error Reporting N/A HDV-SAUVEGARDE EventType clr20r3, P1 powershell.exe, P2 6.0.6002.18111, P3 4acfb18c, P4 mscorlib, P5 2.0.0.0, P6 4889dc80, P7 f4f, P8 7, P9 n3ctrye2kn3c34sgl4zqyrbfte4m13nb, P10 NIL.

Bur everything is OK...
Alexey D.

Re: Problem with Start-VBRJob

Post by Alexey D. »

Hello Olivier,

This is a Microsoft-related issue, something is wrong with powershell itself / mscorlib.
I found some information using google search http://www.eggheadcafe.com/software/asp ... troke.aspx
You may also try using this search to solve your problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest