Running batch file after backup
Hello all.
We are having a strange issue with 11.5 and running a command post backup. In version 10 we use to pass through run PsExec with arguments, however in 11.5 this causes the plan to fail, and then restart the amount of time we have set in the task.
So we have created a batch file (on the server that runs the task) with PsExec and the arguments in it. This triggers fine and reports the whole backup task as being successful. however we get an email from Acronis saying "Differential backup Task execution failed.
Description: It is a differential backup creation task (custom scheme)."
I've looked through the logs and it says it has worked fine, so why is it emailing me saying it has failed.
I have attached the logs from the task, this happens everytime...
Attachment | Size |
---|---|
log.txt | 7.05 KB |

- Log in to post comments

Hello Claire Thomas,
Thank you for posting this question in our forum. I am happy to assist you.
When using pre-/post-commands, please ensure, when disabling such a batch file, not only to unmark the command, but also delete the command line. Otherwise you will continue to receive error messages, even if the backup completed successfully.
If you need additional assistance, please create a system report of the affected machine and contact support. You will find all available support options in our Customer handbook.
If there is anything else we can do for you, please let me know.
Thank you.
- Log in to post comments

Thank you for the responce. This is not what was wrong tho.
I have read in the help files that Acronis needs an exit code of 0 or it will mark the task as failed, even tho the log clearly says the task has worked and there are no errors in the logs.
I have added "EXIT/B 0" to the end of my batch file, this makes the batch file return error code 0 to Acronis and therefore does not fail (even tho the logs say nothing about failing) the task and then restart X number of times that has been set on the plan.
Version 10 does return a warning if the exit code is not 0, but doesn't fail the whole task. (seems the tick box in pre/post commands to fail the whole task if the pre/post fails, doesn't really work as expected)
Thanks
- Log in to post comments

Hello Claire Thomas,
Thank you for your reply.
For normal conditions it is not necessary to provide a return code. The command line itself comes back with a 0 or other value. To define, what should happen if the command fails, you can set an option in Post-backup command: Fail the task if the command execution fail.
The command is considered failed if its exit code is not equal to zero. If the command execution fails, the program will remove the resulting TIB file and temporary files if possible, and the task run result will be set to Failed.
When the check box is not selected, the command execution result does not affect the task execution failure or success. You can track the command execution result by exploring the log or the errors and warnings displayed in the Log view.
If you need additional assistance, please create a system report of the affected machine and contact support. You will find all available support options in our Customer handbook.
If there is anything else we can do for you, please let me know.
Thank you.
- Log in to post comments