Post-job script terminated with exit code 8

Availability for the Always-On Enterprise

Post-job script terminated with exit code 8

Veeam Logoby optidk » Thu 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.
optidk
Novice
 
Posts: 3
Liked: never
Joined: Thu Nov 16, 2017 7:23 am

Re: Post-job script terminated with exit code 8

Veeam Logoby PTide » Thu 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
PTide
Veeam Software
 
Posts: 3403
Liked: 283 times
Joined: Tue May 19, 2015 1:46 pm

Re: Post-job script terminated with exit code 8

Veeam Logoby optidk » Thu 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.
optidk
Novice
 
Posts: 3
Liked: never
Joined: Thu Nov 16, 2017 7:23 am

Re: Post-job script terminated with exit code 8

Veeam Logoby PTide » Thu Nov 16, 2017 9:42 am

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

Thanks
PTide
Veeam Software
 
Posts: 3403
Liked: 283 times
Joined: Tue May 19, 2015 1:46 pm

Re: Post-job script terminated with exit code 8

Veeam Logoby optidk » Thu 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
optidk
Novice
 
Posts: 3
Liked: never
Joined: Thu Nov 16, 2017 7:23 am

Re: Post-job script terminated with exit code 8

Veeam Logoby nefes » Thu 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.
nefes
Veeam Software
 
Posts: 560
Liked: 131 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot], MrSpock and 1 guest