Skip to main content

PRE/POST commands

Thread needs solution
Forum Member
Posts: 10
Comments: 19

We are using RDX cartridges for our backups. It is configured as a removable disk.

Now we want like to reject the cartridge after a SUCCESSFUL backup. We do that with a small batch file which one works fine.

The problem is that there is no possibility to check if the backup was successful and then only the disk should be ejected.

Any idea how to get the worked?

0 Users found this helpful
Regular Poster
Posts: 30
Comments: 339


you could build a batch file and parsing the activity log from acronis using the acrocmd.exe:

An example would be:
C:\Program Files\Acronis\CommandLineTool>acrocmd.exe list tasks --filter_last_result=succeeded --log_format=structured --log=C:\temp\list_tasks_filtered.txt

You will get a XML like structured text file which should be easy to parse.

Regular Poster
Posts: 30
Comments: 339

It is possible to enable "Log to Windows Event Log" in backup plans and use Microsofts LogParser ( ) to get last backup state.

C:\Program Files (x86)\Log Parser 2.2>LogParser.exe -O:CSV "SELECT TimeGenerated, SourceName, Message INTO c:\temp\report.txt FROM Application WHERE SourceName LIKE 'Acronis%' ORDER BY TimeGenerated DESC"

Sample output would be:

2016-08-11 14:00:04,Acronis Backup and Recovery,Event 0x900001: Error code: 12 | Task 'Incremental backup' completed successfully. | trace level: information 
2016-08-11 13:04:59,Acronis Backup and Recovery,Event 0x900001: Error code: 29 | Task 'Incremental backup' was canceled. | trace level: information 

Attachment Size
382543-132373.png 10.02 KB
Forum Member
Posts: 10
Comments: 19

Dear Raphale, many thanks for your fast and precice reply. I will try it and post my results here.



Frequent Poster
Posts: 2
Comments: 549

Hello Stefan,

Alternatively, you should be able to use a simpe post command because post commands normally don't run if the backup failed.

Post-data capture commands always run because these are used to start/stop with databases/