Comprehensive data protection for all workloads
Post Reply
optidk
Novice
Posts: 6
Liked: never
Joined: Nov 16, 2017 7:23 am
Contact:

Post-job script terminated with exit code 8

Post by optidk »

Hello,

After a backup job, we execute a PostScript job that starts a batch file. This batch file should copy the last full backup to a USB drive.

This works fine even if I execute the script by hand. However, if the script is called via Veeam, I get the error message "Post-job script terminated with exit code 8".

Unfortunately, I couldn't find a more detailed description of what this code means.

Can anyone help?

Thank you very much.
PTide
Product Manager
Posts: 6431
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Post-job script terminated with exit code 8

Post by PTide »

Hi,

My first thought is that that you've hit the timeout (900 seconds by default). How long does it take to copy the file using your batch?

Thanks
optidk
Novice
Posts: 6
Liked: never
Joined: Nov 16, 2017 7:23 am
Contact:

Re: Post-job script terminated with exit code 8

Post by optidk »

Hi

I thought so too. But the error comes right after a second.
I have also set the timeout for the copy job to 24 hours.
PTide
Product Manager
Posts: 6431
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Post-job script terminated with exit code 8

Post by PTide »

Would you please post the code that you have in your batch?

Thanks
optidk
Novice
Posts: 6
Liked: never
Joined: Nov 16, 2017 7:23 am
Contact:

Re: Post-job script terminated with exit code 8

Post by optidk »

Just a simple copy job with RoboCopy

Code: Select all

rd "E:\Backup" /S /Q
md "E:\Backup"
robocopy "G:\Backup" "E:\Backup" *.vbk /r:1 /w:1 /maxage:6 /log+:backup2usb.log
But not even the first line is executed. The backup folder is not deleted
nefes
Veeam Software
Posts: 643
Liked: 162 times
Joined: Dec 10, 2012 8:44 am
Full Name: Nikita Efes
Contact:

Re: Post-job script terminated with exit code 8

Post by nefes »

Post-job script is executed in the context of the account under which Veeam Backup Service runs.
By default that is localsystem user. To me it looks like service account does not see volume E, so rd fails.
You can try to run your script with that user (for example by using psexec) and see output there.
Post Reply

Who is online

Users browsing this forum: No registered users and 90 guests