Yes, I am looking for examples because I cannot get the simplest .bat file to do anything.
Try looking in the Backup Job log to see if it shows anything on why the Script isn’t (seemingly) doing anything. It should be on the VBR Server at:
C:\ProgramData\Veeam\Backup\<job-name>.log
It gives me exactly the same information:
p14.06.2024 23:29:06.557] <01> Warning (3) Pre-job script terminated with exit code 3
Here are a couple of sites to help:
https://www.veeam.com/kb2183
And, the exit code isn't Veeam related...it's from the script file type (pretty sure). Here are codes for batch files:
https://www.geeksforgeeks.org/batch-script-return-code/
The best way to test your script is to 1st run it alone on the device or similar device but a test one, to see if it runs as expected; then place it in Veeam.
Break your total process up in layers & make sure things are successful in part. Then place it all together and attempt to run it wholistically.
Cannot get Veeam pre- and postscripting to do anything.
I now applied a Powershell script to do
- enable the NIC
- connect the VPN to the external server
- run the VBR backup job to backup the external server
- disconnect VPN
- disable the NIC
for multiple backup jobs.
This way I only have to use VBR for backing up and have all jobs running in one script independent of Veeam.
Cannot get Veeam pre- and postscripting to do anything.
I now applied a Powershell script to do
- enable the NIC
- connect the VPN to the external server
- run the VBR backup job to backup the external server
- disconnect VPN
- disable the NIC
for multiple backup jobs.
This way I only have to use VBR for backing up and have all jobs running in one script independent of Veeam.
Glad you got it working with PS. That is my go to for scripting.
Hi @mvandek2 - that’s great to hear you were able to find/create a script which works for you. So, to clarify your process → did you use an Agent job in Veeam Backup? And, you placed your script in the Job settings to have a pre/post-JOB script?
Also, if any of our comments helped you in any way, please don’t forget to select one as ‘Best Answer’ so others with a similar issue who come across your post may benefit.
Best!
Hi @mvandek2 - that’s great to hear you were able to find/create a script which works for you. So, to clarify your process → did you use an Agent job in Veeam Backup? And, you placed your script in the Job settings to have a pre/post-JOB script?
Also, if any of our comments helped you in any way, please don’t forget to select one as ‘Best Answer’ so others with a similar issue who come across your post may benefit.
Best!
I only use VBR and OpenVPN to backup external servers, no agent, however, I see Veeam installing “Veeam Backup Transport” and “Veeam Installer service” being pushed to the remote systems; that's unexpected and a pitty from my perspective (less software is better).
As said, I cannot get pre- and post scripts to work at all, all automation is run via a single Powershell script, fortunately.
@mvandek2 - oh, ok. So no Agent, but just Veeam Backup. Good to know. Yes, for any systems you backup with VBR, so Veeam can process the systems and transport backed up data to Repositories, it has to deploy and use those services to do the tasks it needs to perform. I understand your concern, but those services are small and I have yet to hear about them causing issue in the long time I’ve been using Veeam.
Hi @mvandek2 - that’s great to hear you were able to find/create a script which works for you. So, to clarify your process → did you use an Agent job in Veeam Backup? And, you placed your script in the Job settings to have a pre/post-JOB script?
Also, if any of our comments helped you in any way, please don’t forget to select one as ‘Best Answer’ so others with a similar issue who come across your post may benefit.
Best!
I only use VBR and OpenVPN to backup external servers, no agent, however, I see Veeam installing “Veeam Backup Transport” and “Veeam Installer service” being pushed to the remote systems; that's unexpected and a pitty from my perspective (less software is better).
As said, I cannot get pre- and post scripts to work at all, all automation is run via a single Powershell script, fortunately.
Those 2 services are a requirement to complete backups properly. If you want to know more about the transport service you can read here - Veeam Data Mover Service - User Guide for VMware vSphere