My Pre-Execution Script, FWIW

Discussion in 'Acronis True Image Product Line' started by bulldog356, Jul 20, 2006.

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

    bulldog356 Registered Member

    Feb 8, 2005
    Frequent visitors here know that one of the most requested features for True Image Home has been the ability to create a series of rotating backups, like in Norton Ghost and other backup programs. The developers offer instead three suggestions:

    1) Buy a corporate edition of True Image -- sure.

    2) Use the Acronis Secure Zone -- a good idea, but the Secure Zone has limitations.

    3) Write a script -- in other words, you be the programmer.

    I tried my hand at writing a batch file that keeps a running history of my 7 most recent backups. The batch file runs before a scheduled backup job that makes a full image of my system partition called backup_1.tib.

    Is it crude? Yes. I'm not a programmer. For what it's worth, here it is.


    @echo off

    cd /d I:\Acronis\C_Drive

    if exist backup_7.tib del backup_7.tib
    if exist backup_6.tib ren backup_6.tib backup_7.tib
    if exist backup_5.tib ren backup_5.tib backup_6.tib
    if exist backup_4.tib ren backup_4.tib backup_5.tib
    if exist backup_3.tib ren backup_3.tib backup_4.tib
    if exist backup_2.tib ren backup_2.tib backup_3.tib
    if exist backup_1.tib ren backup_1.tib backup_2.tib



    The pre-execution command is C:\WINDOWS\system32\cmd.exe (your path may vary) and the parameters are: /c C:\Rename_Images.bat

    I've been using this method for a while and it seems to work. Comments are invited, particularly if they improve my programming skills. o_O
  2. _Kento_

    _Kento_ Registered Member

    Apr 3, 2006
    Hello Bulldog,

    I am not sure about your first statement ("Buy a corporate edition of True Image -- sure"). As far as I know they have the same way of creating "a series of rotating backups" - scheduled tasks and pre/post commands.

    2) I do not like ASZ. I do not need this partition since I have external HDD. (my choice)

    3) May be you are right. But if you open the script file with notepad you will see how it is simple (you to deside).

    The same procedure you have described I'm performing with 7 scheduled tasks. Actually one but with little changes.

    TASK1: Create full backup (backup_1.tib) - with weekly execution and runs on Monday every one week.
    TASK2: Create full backup (backup_2.tib) - with weekly execution and runs on Thursday every one week.
    TASK7: Create full backup (backup_7.tib) - with weekly execution and runs on Sunday every one week.

    So in the end of the week I have 7 full backups of my system. Next week all start over again. The oldest full backup overwrites first.

  3. shieber

    shieber Registered Member

    Oct 27, 2004
    There are a couple of ways to do this or something very similar with only one task and using some variables in batch file that is called by the task. The trick is to assign the date or one or two digits of the date as part of the filename using commands like set, for, rename.

    You can find some tips on it here: batch

Thread Status:
Not open for further replies.