Pre/Post command - test works, real fails

Discussion in 'Acronis True Image Product Line' started by Jayster, Jun 25, 2007.

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

    Jayster Registered Member

    Joined:
    Apr 9, 2006
    Posts:
    4
    I am trying to add a post command to a scheduled backup task. If I click the "test command" button it works. But when it gets invoked by the actual backup task it fails.

    Post Command Syntax:
    cmd.exe /C UpdateMailBackup.cmd
    working directory set to the location of the batch file (which is also covered by the system path variable).

    Error Log
    Failed to run a child process
    System error: 267
    Execution of user command cmd.exe failed. Error code: 1
    Operation has completed with errors.


    What's in the UpdateMailBackup.cmd file? For troubleshooting purposes, all it does is perform a directory listing on a mapped network drive.

    I found that if I change the batch file to simply "echo foo" it always works. But when I change it to access a mapped network folder, it only works from the "Test Command" button.
     
  2. Jayster

    Jayster Registered Member

    Joined:
    Apr 9, 2006
    Posts:
    4
    Also, a bit of info about what I'm really trying to do.

    I found that running the scheduled backup would tie up the client machine so much that nothing else could run for a very long time (until the task completed). Made no difference if I set task priority to low.

    On a hunch, I guessed it was due to limited bandwidth between the client machine and the network drive. Acronis continuously writes to the destination during a backup, and the slow connection causes problems.

    It appears this was indeed choking the client machine. I changed the backup output to the local drive and now it completes very fast. So I wanted to add a post command to move the backup file over to the network drive. Now I find the post command doesn't work.

    So now I'm back to square one.
     
  3. Acronis Support

    Acronis Support Acronis Support Staff

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

    Thank you for choosing Acronis Disk Backup Software.

    Please have a look at this thread <Post Batch Command NOT Working> to find information about using pre/post commands of Acronis True Image. Pay attention to the fact that interactive commands (i.e. requiring user input, for example "pause") are not supported in the current version of Acronis True Image.

    Thank you.
    --
    Aleksandr Isakov
     
  4. Jayster

    Jayster Registered Member

    Joined:
    Apr 9, 2006
    Posts:
    4
    Thanks for the reply. I don't have any interactive commands in the .cmd file. I seem to have isolated it to one particular problem: the pre/post command refuses to interact with a mapped network drive.

    To test this, I have it execute one simple command: dir f:

    This works fine from the "test command" button but it fails when initiated by the Acronis task.

    The parameters from the "Edit Command" dialog are:
    Command: cmd.exe
    Working directory: C:\Program Files\misc\scripts\
    Arguments: /C UpdateMailBackup.cmd

    I really hope this can be overcome. The usefulness of being able to move files to a network drive after completing the backup is big. This way I can still create a backup file even if I'm not connected to the network.
     
  5. thomasjk

    thomasjk Registered Member

    Joined:
    Jul 22, 2005
    Posts:
    1,477
    Location:
    Charlotte NC
    Here is the relevant portion of my backup script which goes to network drive:

    net use "\\Gateway\firewire" Tom /user:Tom
    rem pause

    if exist "\\Gateway\firewire\Laptop3677.tib" rename "\\Gateway\firewire\Laptop3677.tib" "%date:/=.%.tib"

    rem pause

    net use "\\Gateway\firewire" /delete

    Note the net use statement is what makes it work properly.
     
  6. Jayster

    Jayster Registered Member

    Joined:
    Apr 9, 2006
    Posts:
    4
    Wow, that worked. Thanks!!!
     
  7. thomasjk

    thomasjk Registered Member

    Joined:
    Jul 22, 2005
    Posts:
    1,477
    Location:
    Charlotte NC
    Glad to help. That is from the batch file I downloaded from Acronis.com.
     
Thread Status:
Not open for further replies.