-
- Veteran
- Posts: 270
- Liked: 15 times
- Joined: Jan 03, 2012 2:02 pm
- Full Name: Tristan Floor
- Contact:
Batch file with commandline jobs
Hi,
Is it possible to create a commandline batch file, with the Job commandlines inside, while each job is waiting for each other before going to the next line of the batch file?
So first: D:\Apps\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup dcd93df2-b4a7-4f3f-9bb5-ab3177aabb51
ANd if that job is finished the batch file is going further to
D:\Apps\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup dcd93df2-b4a7-4f3f-9bb5-ab317sdfsdfj239
Now everything is running immediatly...I don't want that
Thanks
Is it possible to create a commandline batch file, with the Job commandlines inside, while each job is waiting for each other before going to the next line of the batch file?
So first: D:\Apps\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup dcd93df2-b4a7-4f3f-9bb5-ab3177aabb51
ANd if that job is finished the batch file is going further to
D:\Apps\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup dcd93df2-b4a7-4f3f-9bb5-ab317sdfsdfj239
Now everything is running immediatly...I don't want that
Thanks
-
- Veeam Software
- Posts: 21139
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Batch file with commandline jobs
Actually, you do not need a batch file to chain the jobs, but can use post-job activity setting instead (add each new job as a post-job command (Edit Backup Job > Storage > Advanced > Advanced) to the previous job).
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Batch file with commandline jobs
I believe it should be quite easy with PowerShell, see existing thread on that: Veeam Backup v4 wait command (nevermind the title)
-
- Veteran
- Posts: 270
- Liked: 15 times
- Joined: Jan 03, 2012 2:02 pm
- Full Name: Tristan Floor
- Contact:
Re: Batch file with commandline jobs
That's not enough.foggy wrote:Actually, you do not need a batch file to chain the jobs, but can use post-job activity setting instead (add each new job as a post-job command (Edit Backup Job > Storage > Advanced > Advanced) to the previous job).
I have a lot of commands after each other to complete the backup flow.
- veeam jobs
- archive bit resets
- backup exec jobs.
-
- Veeam Software
- Posts: 21139
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Batch file with commandline jobs
Then you should definitely go with PowerShell.
-
- Veteran
- Posts: 270
- Liked: 15 times
- Joined: Jan 03, 2012 2:02 pm
- Full Name: Tristan Floor
- Contact:
Re: Batch file with commandline jobs
that's something i have to learn!.... so no ready togo script for me.foggy wrote:Then you should definitely go with PowerShell.
I like powershell, but i have to still learn it.
Thanks.
-
- Veeam Software
- Posts: 21139
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Batch file with commandline jobs
Try to search, I think you can find some samples here.
-
- Influencer
- Posts: 16
- Liked: never
- Joined: Jun 27, 2011 1:50 pm
- Full Name: ISExpress
- Contact:
Re: Batch file with commandline jobs
Hi
We have recently upgraded our Backup Exec environment from 2010 to 2012. We use Veeam and do reversed incremental jobs. We run 4 Veeam jobs in total and in one of the Jobs (the last job that runs) I have setup a post job activity for it to run a bat file on the c:\ drive but once the veeam job finishes it fails to run the bat file.
Is there any way I can find out through log files why it doesnt run?
If I run the bat file manually it runs fine. The bat file is basically a command to run Powershell and run a powershell command to kick of a job in Backup Exec 2012 (which now utilises powershell rather than traditional command line).
In the Bat file it contains the following:
c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe start-bejob -i '"SymantecBackupjobname"' -confirm:$false
Also in powershell I have imported the module which Symantec uses to run powershell commands. If I run this command manually it works without any issue.
I think a few other Veeam uses also use Backup exec, it be interesting to know if these same users have upgraded to Backup Exec 2012 and use veeam post job option...
Any advice would be appreciated. I will also log this on the symantec forum to see if they can help.
Thanks
We have recently upgraded our Backup Exec environment from 2010 to 2012. We use Veeam and do reversed incremental jobs. We run 4 Veeam jobs in total and in one of the Jobs (the last job that runs) I have setup a post job activity for it to run a bat file on the c:\ drive but once the veeam job finishes it fails to run the bat file.
Is there any way I can find out through log files why it doesnt run?
If I run the bat file manually it runs fine. The bat file is basically a command to run Powershell and run a powershell command to kick of a job in Backup Exec 2012 (which now utilises powershell rather than traditional command line).
In the Bat file it contains the following:
c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe start-bejob -i '"SymantecBackupjobname"' -confirm:$false
Also in powershell I have imported the module which Symantec uses to run powershell commands. If I run this command manually it works without any issue.
I think a few other Veeam uses also use Backup exec, it be interesting to know if these same users have upgraded to Backup Exec 2012 and use veeam post job option...
Any advice would be appreciated. I will also log this on the symantec forum to see if they can help.
Thanks
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Batch file with commandline jobs
Did this script run successfully prior to your upgrade of BE environment?
If this is the first time you use this script, please look through this topic, might help: Post Job Activity (script) not launching
If this is the first time you use this script, please look through this topic, might help: Post Job Activity (script) not launching
-
- Influencer
- Posts: 16
- Liked: never
- Joined: Jun 27, 2011 1:50 pm
- Full Name: ISExpress
- Contact:
Re: Batch file with commandline jobs
Hi
Yes I just looked at the file and the way that was resolved was by running the command as "run every 1 backup cycle". THe problem with this is it will run every day and I only need it to run this file Monday to Saturday as we dont back to tape on a Sunday but we do run the Veeam backup.
Yes I just looked at the file and the way that was resolved was by running the command as "run every 1 backup cycle". THe problem with this is it will run every day and I only need it to run this file Monday to Saturday as we dont back to tape on a Sunday but we do run the Veeam backup.
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Batch file with commandline jobs
Hmm...so you're saying the script is not triggered when you choose to run in on specific days? That's not expected and I would recommend to show this behavior to our support team.
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 70 guests