Pre/Post Command Error Reporting

Discussion in 'Acronis True Image Product Line' started by CAOgdin, Jun 5, 2009.

Thread Status:
Not open for further replies.
  1. CAOgdin

    CAOgdin Registered Member

    Joined:
    Nov 1, 2004
    Posts:
    87
    I've never been able to find documentation on how to write pre/post commands; is there one available?

    Specifically, I'm throwing an error (exit /b 101) in a Pre- command, ATIW Echo (9.7.8206) reports the error in the log, then continues anyway! (Yes, I have the option "Abort the operation if the user command fails" checked.)

    Is there some specific way ATI requires errors from Pre/Post commands to be communicated so it can actually do what the option "Abort the operation if the user command fails" says?

    And, is that documented somewhere?
     
  2. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello CAOgdin,

    Thank you for using Acronis True Image Echo Workstation

    We have some samples of batch files, please check this article in our Knowledge Base for the detailed information.

    Could you please provide us with the exact sequence of actions that lead to the issue you report, so that we can reproduce it?

    Please also provide us with the exact text of error message.

    Thank you.
    --
    Alexander Nikolsky
     
  3. CAOgdin

    CAOgdin Registered Member

    Joined:
    Nov 1, 2004
    Posts:
    87
    Here's my offer: If You'll do your part, I'll do my part. I have too often spend HOURS of effort to send Acronis information that ends up in a black hole and never results in any response or product improvement.

    The link you sent me to SAYS NOTHING about error code requirements in batch files. I WILL REPEAT MY QUERY: What does Acronis True Image expect for an error code that will trigger "Abort the operation if the user command fails."?

    As I have reported, in ATIW Echo v9.7.8206, the error is recognized and recorded in the log, but then the image backup proceeds on as if there was never any error reported.
     
  4. CAOgdin

    CAOgdin Registered Member

    Joined:
    Nov 1, 2004
    Posts:
    87
    Despite your refusal to provide me with requisite information so far, I have taken the time to provide you with the exact test that demonstrates the problem.

    I created a special Task for testing; it is attached (89CA1200-40D6-4DE4-9079-6FBC1268B0EB.tib.tis).

    That task sets test.cmd as both Pre- and Post-command; it is attached. Note that "Abort the operation" was selected in the task configuration, in the "Edit Command" dialog box.

    The log Log shows that although the option to "Abort the operation" was selected, the backup continued despite the reported error.

    AGAIN: MY QUESTION IS SIMPLE: WHAT DOES ACRONIS TRUEIMAGE REQUIRE AS AN ERROR CODE/ERROR LEVEL RETURNED TO TRUEIMAGE FROM A PRE- or POST- COMMAND?

    Diagnosis: I suspect that the field terminal_flag="false" is a bug, and should be TRUE because I selected "Abort the command..." on both pre- and post-commands (assuming "terminal_flag" represents the "Abort the command..." option).

    89CA1200-40D6-4DE4-9079-6FBC1268B0EB.tib.tis:
    <?xml version="1.0" encoding="UTF-8" ?>
    <batch>
    <version>
    2.0
    </version>
    <uuid>
    89CA1200-40D6-4DE4-9079-6FBC1268B0EB
    </uuid>
    <display>
    Test
    </display>
    <description>
    &lt;separator type='gradient'/>Operation 1 of 3&lt;endl/>&lt;tabpoint value=30>&lt;bold>&lt;bold>Carrying out user command&lt;/bold>&lt;/endl>&lt;tabpoint value=30>&lt;indent value=4>Command : &lt;indent value=10>&lt;textcolor value="navyblue">"Test.cmd"&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>&lt;/indent>&lt;endl/>&lt;/bold>Operation 2 of 3&lt;endl/>&lt;tabpoint value=30>&lt;bold>&lt;bold>Backup files and folders&lt;/bold>: &lt;indent value=10>&lt;endl/> "C:\Documents and Settings\Friday\Desktop\"&lt;/indent>&lt;indent value=4>&lt;endl/>&lt;/tabpoint>&lt;/indent>&lt;endl/>&lt;/bold>Operation 3 of 3&lt;endl/>&lt;tabpoint value=30>&lt;bold>&lt;bold>Carrying out user command&lt;/bold>&lt;/endl>&lt;tabpoint value=30>&lt;indent value=4>Command : &lt;indent value=10>&lt;textcolor value="navyblue">"test.cmd"&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>&lt;/indent>&lt;endl/>&lt;/bold>
    </description>
    <priority>
    low
    </priority>
    <stage>
    <description>
    &lt;bold>Create Full Backup Archive&lt;/bold>&lt;endl/>&lt;tabpoint value=30>&lt;indent value=4>From: &lt;indent value=10>&lt;textcolor value="navyblue">C:\Documents and Settings\Friday\Desktop\&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>To file: &lt;indent value=10>&lt;textcolor value="navyblue">"X:\TestBackup.tib"&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Compression: &lt;indent value=10>&lt;textcolor value="navyblue">Normal&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>File Split: &lt;indent value=10>&lt;textcolor value="navyblue">4.340 GB&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Exclude: &lt;indent value=10>&lt;textcolor value="navyblue">Files matching mask&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Match criterion: &lt;indent value=10>&lt;textcolor value="navyblue">*.bak, *.~, *.tmp, &lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Description: &lt;indent value=10>&lt;endl/>&lt;textcolor value="navyblue">"Test Backup To Show Pre/Post Command Error Reporting Failures"&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>&lt;/indent>
    </description>
    <user_command>
    <command mode="backup" skip_result="false" terminal_flag="false" wait_for_end="true">
    Test.cmd
    </command>
    <work_directory>
    C:\Program Files\Utilities\Acronis TrueImage Workstation Echo\Scripts &amp; Logs\
    </work_directory>
    </user_command>
    <backup>
    <archive>
    <file>
    X:\TestBackup.tib
    </file>
    </archive>
    <options backup_acronis_svc="false" compression="normal" description="Test Backup To Show Pre/Post Command Error Reporting Failures" no_cache_network_write_timeout="5" port_number="21" split="4660039516">
    <filtering exclude_by_mask="true" exclude_hidden="false" exclude_system="false">
    <mask>
    *.bak
    </mask>
    <mask>
    *.~
    </mask>
    <mask>
    *.tmp
    </mask>
    </filtering>
    <file_backuping ignore_encryption="false" skip_security="false" />
    <speed_limit>
    <net mode="percent" value="100" />
    <disk mode="percent" value="100" />
    </speed_limit>
    </options>
    <files>
    <include>
    C:\Documents and Settings\Friday\Desktop\
    </include>
    </files>
    <dbase-support VSS="disable">
    <before_snapshot_command>
    <command />
    </before_snapshot_command>
    <after_snapshot_command>
    <command />
    </after_snapshot_command>
    </dbase-support>
    </backup>
    <user_command>
    <command mode="backup" skip_result="false" terminal_flag="false" wait_for_end="true">
    test.cmd
    </command>
    <work_directory>
    C:\Program Files\Utilities\Acronis TrueImage Workstation Echo\Scripts &amp; Logs\
    </work_directory>
    </user_command>
    </stage>
    <common_options>
    <notify>
    <email address="" enabled="1" from="" long_format="1" pop-before-smtp="false" pop-server="" pop-server-port="110" server="" server-port="25" subject="Acronis*True*Image*Echo Workstation Notification from Mahvin.deepwoods.com" user="">
    <notify_mode full_log="true" operation_complete="true" operation_fail="true" operation_message="true" />
    </email>
    <winpopup enabled="1" long_format="1" server="">
    <notify_mode full_log="false" operation_complete="true" operation_fail="true" operation_message="true" />
    </winpopup>
    </notify>
    <win32-tracing trace_level="error" />
    <SNMP-tracing community="public" trace_level="error" />
    <monitor />
    </common_options>
    </batch>

    test.cmd
    REM Do nothing, just fail
    exit /b 100

    Log
    <?xml version="1.0" encoding="UTF-8" ?>
    <log uuid="DB4F19E5-971A-4B8D-ACBD-9F00C9BA42AF" product="Acronis*True*Image*Echo Workstation" version="1.0" build="174" task="89CA1200-40D6-4DE4-9079-6FBC1268B0EB" >
    <event id="1" level="2" module="100" code="2" time="1244678125" message="The &quot;Test&quot; operation started" />
    <event id="2" level="3" module="100" code="11" time="1244678125" message="Priority changed to Low priority" />
    <event id="3" level="2" module="1" code="1024" time="1244678125" message="Child process has exited with code 0" />
    <event id="4" level="2" module="100" code="134" time="1244678125" message="Execution of user command succeeded: Test.cmd" />
    <event id="5" level="2" module="1" code="506" time="1244678127" message="Locking partition C:..." />
    <event id="6" level="2" module="1" code="1008" time="1244678128" message="&lt;bold>Create Full Backup Archive&lt;/bold>&lt;endl/>&lt;tabpoint value=30>&lt;indent value=4>From: &lt;indent value=10>&lt;textcolor value=&quot;navyblue&quot;>C:\Documents and Settings\Friday\Desktop\&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>To file: &lt;indent value=10>&lt;textcolor value=&quot;navyblue&quot;>&quot;X:\TestBackup.tib&quot;&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Compression: &lt;indent value=10>&lt;textcolor value=&quot;navyblue&quot;>Normal&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>File Split: &lt;indent value=10>&lt;textcolor value=&quot;navyblue&quot;>4.340 GB&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Exclude: &lt;indent value=10>&lt;textcolor value=&quot;navyblue&quot;>Files matching mask&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Match criterion: &lt;indent value=10>&lt;textcolor value=&quot;navyblue&quot;>*.bak, *.~, *.tmp, &lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>Description: &lt;indent value=10>&lt;endl/>&lt;textcolor value=&quot;navyblue&quot;>&quot;Test Backup To Show Pre/Post Command Error Reporting Failures&quot;&lt;/textcolor>&lt;/indent>&lt;indent value=4>&lt;endl/>&lt;/indent>" />
    <event id="7" level="2" module="1" code="1024" time="1244678128" message="Child process has exited with code 0" />
    <event id="8" level="2" module="100" code="134" time="1244678128" message="Execution of user command succeeded: test.cmd" />
    <event id="9" level="2" module="100" code="6" time="1244678128" message="Operation has succeeded." />
    </log>

    I would have included these as files, and provided screen shots, but your primitive "forum" software is apparently configured to prohibit that.
     
  5. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    If you click the Go Advanced button, you get the screen where you can upload files and pictures.
     
  6. CAOgdin

    CAOgdin Registered Member

    Joined:
    Nov 1, 2004
    Posts:
    87
    Thanks for the advice, Mudcrab.

    One little detail: Where can I find this "Go Advanced" button? I scanned over each icon in the "Reply to Thread" page, I looked under each and every menu item on the top bar, I searched on "go advanced," and I can't find it.

    I would have thought that the "paper clip" icon on the "Reply to Thread" page would offer the "attach" functionality, but the entire button is non-responsive.

    The "Reply to Thread" page's "Additional Options" mentions "Attach files," but clicking it doesn't seem to produce any effect.
     
  7. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    The Go Advanced button is at the bottom of the Quick Reply section at the bottom of the thread (next to the Post Quick Reply button). However, if you're already getting to the screen with the more advanced options (like the paperclip button), then you're already there. There is also a button on that screen in the Additional Options section: Manage Attachments.

    When you attach a file, a new window or tab in the browser will open. Do you have a pop-up blocker stopping it?
     
  8. CAOgdin

    CAOgdin Registered Member

    Joined:
    Nov 1, 2004
    Posts:
    87
    Thanks for the additional info. You're right. Apparently IE7 is blocking the "paper clip" popup (even though popups are NOT disabled, and I turned all other "security tools" completely off). I used Firefox 3.x, and it worked perfectly. I'll use Firefox the next time I've got attachments to deliver. (incidentally, Google Chrome doesn't even show the "Post Reply," "Edit" or "Quote" buttons.)

    Thanks for sticking with me on figuring this one out.

    Now, I'm still waiting for Acronis to acknowledge the problem I'm reporting, and to answer my question about "error code" expectations of ATIW.

    --Carol Anne
     
Thread Status:
Not open for further replies.