Problem with Start-VBRJob

PowerShell script exchange

Problem with Start-VBRJob

Veeam Logoby Wieland » Mon Nov 08, 2010 2:21 pm

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
Wieland
Lurker
 
Posts: 2
Liked: never
Joined: Sat Nov 21, 2009 3:13 pm
Full Name: Sebastian Wieland

Re: Problem with Start-VBRJob

Veeam Logoby Gostev » Mon Nov 08, 2010 2:42 pm

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.
Gostev
Veeam Software
 
Posts: 21396
Liked: 2349 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Problem with Start-VBRJob

Veeam Logoby omorin » Mon Nov 15, 2010 1:38 pm

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 ?
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Problem with Start-VBRJob

Veeam Logoby Wieland » Mon Nov 15, 2010 2:53 pm

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
Wieland
Lurker
 
Posts: 2
Liked: never
Joined: Sat Nov 21, 2009 3:13 pm
Full Name: Sebastian Wieland

Re: Problem with Start-VBRJob

Veeam Logoby omorin » Wed Nov 17, 2010 8:02 am

Bonjour !

It just run fine, but what is the meaning of "-runasync" and where can i find the manual of the VBR powershell commands ?
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Problem with Start-VBRJob

Veeam Logoby Gostev » Wed Nov 17, 2010 11:57 am

-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.
Gostev
Veeam Software
 
Posts: 21396
Liked: 2349 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Problem with Start-VBRJob

Veeam Logoby omorin » Wed Nov 24, 2010 10:56 am

When i run this script, i have this error :
11/24/201003:33:43105000.NET Runtime 2.0 Error ReportingN/AHDV-SAUVEGARDEEventType 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...
omorin
Enthusiast
 
Posts: 35
Liked: 3 times
Joined: Tue Oct 19, 2010 1:37 pm
Location: Bergerac, France
Full Name: olivier morin

Re: Problem with Start-VBRJob

Veeam Logoby Alexey D. » Wed Nov 24, 2010 11:03 am

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.
Alexey D.
 


Return to PowerShell



Who is online

Users browsing this forum: Bing [Bot] and 4 guests