Availability for the Always-On Enterprise
Post Reply
optidk
Novice
Posts: 5
Liked: never
Joined: Nov 16, 2017 7:23 am
Contact:

Post-job script terminated with exit code 8

Post by optidk » Nov 16, 2017 7:35 am

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
Veeam Software
Posts: 4251
Liked: 350 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Post-job script terminated with exit code 8

Post by PTide » Nov 16, 2017 8:38 am

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: 5
Liked: never
Joined: Nov 16, 2017 7:23 am
Contact:

Re: Post-job script terminated with exit code 8

Post by optidk » Nov 16, 2017 8:56 am

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
Veeam Software
Posts: 4251
Liked: 350 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Post-job script terminated with exit code 8

Post by PTide » Nov 16, 2017 9:42 am

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

Thanks

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

Re: Post-job script terminated with exit code 8

Post by optidk » Nov 16, 2017 10:02 am

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: 590
Liked: 140 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 » Nov 16, 2017 5:16 pm

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: JimmyO and 55 guests