Create a batch error, to stop Acronis from executing

Discussion in 'Acronis True Image Product Line' started by Acryllic, Jun 22, 2009.

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

    Acryllic Registered Member

    Joined:
    Jun 22, 2009
    Posts:
    4
    Hello dear Boardmembers,


    I've written a batch-file to administer and execute our backup rotation scheme.
    To minimize the risc of overwriting important backup-files, I've made an exception error routine.
    Problem is: Acronis still creates a backup, although the pre-procedure ends with an error.
    The exception error is created by calling a file within the batch, which doesn't exist.

    [noparse]We're using Acronis True Image Echo Sever (build 8.01:cool:.[/noparse]

    Do you know what kind of batch command would create an error that could stop Acronis from making a new update file?

    P.s.: The pre-procedure is ofcourse marked as "do not proceed if the operation ends with an error"
     
    Last edited: Jun 22, 2009
  2. Acronis Support

    Acronis Support Acronis Support Staff

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

    Thank you for using Acronis True Image Echo Server for Windows

    If you want to have a new full backup created every time a scheduled task is run, so that there will be several full backups instead of one, you can use the following batch file

    This batch file renames a specified file, so that a new file with the same name will not overwrite it. If you schedule a task that regularly creates a full backup, you may use Acronis True Image pre/post commands or Windows Scheduled Task Wizard to run this batch file before or after the backup process.

    You should do the following to prevent Acronis True Image from overwriting a full backup under a scheduled task:

    - Download rename_backup.bat
    - Edit the file in Notepad or another word processor;
    - Follow the instructions provided in the file to modify its contents according to the parameters of the task you scheduled in Acronis True Image;
    - Use Acronis True Image pre/post commands or Windows Scheduler Task Manager (in Windows XP: Control Panel -> Scheduled Tasks -> Add Scheduled Task) to run the batch file before the backup process starts or after it is finished (thus, either renaming the previous backup or the newly created one).


    Best regards,
    --
    Dmitry Nikolaev
     
  3. Acryllic

    Acryllic Registered Member

    Joined:
    Jun 22, 2009
    Posts:
    4
    Hello Dmitry,


    thank you for your reply!
    I'm using a version of the son-father-grandfather backup scheme.
    There are 4 files a,b,c and d.
    As pre-procedure my batch file does the following:
    1. It deletes the old d-file
    2. It renames c to d
    3. It renames b to c
    4. It renames a to b

    Thus, I allways know which is the most recent file and don't have to delete old backup files myself.

    But for savety reasons, I've put in a few extra commands that check if everything ist working the way it should.
    For example, if it wasn't possible to rename the a-file (for whatever reason).

    To stop Acronis from backuping in such a case (so that the new file doesn't overwrite the old file), I wanted to implement an exception error that Acronis recognizes as such.

    When you make a job and tell Acronis to use a pre-procedure you can activate the "don't proceed if pre-procedure ends with an error" box.

    I did so and also used the "check procedure" button, to guarantee that Acronis understands that the procedure ends with an error (which it did)

    But when I let Acronis make a normal backup (with the procedure) it just ran normaly and created a new backup, ignoring that the procedure had ended with an error.

    I'm not sure why Acronis does this, since it recognizes the error in "test procedure".
    That is why I'm looking for a batch error that actually stops Acronis from proceeding.


    Regards, Acryllic
     
  4. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    It's just myiopia on Acronis's part. Why are they even still steering folks towards batch files to manage backups? Give them time; they'll eventually get it.
     
  5. Acryllic

    Acryllic Registered Member

    Joined:
    Jun 22, 2009
    Posts:
    4
    Hello again,


    I've found the problem.
    In my batch-file I had a goto-command AFTER the exception-error producing CALL of a non-existent file.

    After reorganizing my source code so that the last command really is the CALL of a non existing file Acronis finally recognizes the error and doesn't proceed. The only thing after the CALL command is the jump-label for the end of the file.

    Thank you again for your help!


    Regards, Acryllic
     
  6. Acryllic

    Acryllic Registered Member

    Joined:
    Jun 22, 2009
    Posts:
    4
    I thought so myself at the beginning, but after working with batch-files for bit I'm not that averse about it anymore.

    It's quick to write, easy to change and easy to explain to others.
    The downside is it's unreliability and the sometimes frustrating rules and boundaries.

    Like I said, after finding my mistake the backup works perfectly.
     
  7. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    Good job, Acryllic,

    And thanks for letting us know the solution problem/solution. Another solution could have been to use batch files to call the ATI executable and thereby relying on your own error checking. Batch files are like driving with the top done, you can get where you're going and it can can even be fun but you have to really watch out for those low-hanging tree limbs ;)
     
Thread Status:
Not open for further replies.