Automating True Image

Discussion in 'Acronis True Image Product Line' started by jsquareg, May 7, 2006.

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

    jsquareg Registered Member

    Joined:
    May 5, 2006
    Posts:
    72
    Is there a way to create a batch file or script to run True Image to do a specific task? I would like to put such a thing on my recovery CD so that I can execute it to do a full backup of one particular partition periodically. Not sure how I would handle the new image file name each time but I would like to try.

    Thank you very much.
     
  2. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    Assume you're running windows? then this should work. There are other ways to do this but his is the easiest:

    I believe you can set up a task in ATI to do partiion or disk or file backup. Make sure the task properties are set so that verifiy after backup is not checked and that under post commands, Do not perform operations until task is complete IS checked and that abort execution if command fails is not checked.

    The command to put in the post command window is "cmd.exe" without the quotes. YOu might need the full path to cmd.exe, which is probably windows/system32, but search your disk for it. Cmd.exe is the command processor to run batch files in Win.

    Udner arguments, put "/c d:\your_batch-filename.bat" without the quotes and using your own batch path\filename. the "/c" parameter makes cmd.exe unload after the batch file is run -- without it, ATI will hang because the command processor stays in memory waiting for a next command that never comes.

    For a batch file that automatically makes unique filenames but won't overfill a disk, a simple one to use is this:

    set Day=%Date:~8,1%
    if not exist d:\mybackup.tib goto notthere
    :delfile
    if exist d:\mybackup_%Day%.tib del d:\mybackup_%Day%.tib
    ren d:\mybackup.tib mybackup_%Day%.tib
    :notthere


    Note that you should use full path\filename everywhere shown and not use the path where not shown above (i.e., the ren or rename command needs a path on it's first argument but doesn't take on on the second).

    The above batch file will set a temporary variable within the command processor environment to a date string character -- the character taken is the second digit of the day-date-number -- for example, if the date is the 31st, the character will be "1", if the 25th, then "5", etc. So depending on the date, the character will be one of "0" through "9" and after 10 days, it will start over again.

    The next line checks that the backup was created. If you use a diff name for you backup in the task you created in Acronis, then use that filename with full path.

    The batch file tests for the existence of a file that already has today's date character attached. If it exists, it is deleted to make room for a new one. Then the new backup is renamed by appending "_" and the date character to the name. So after ten days you will have "mybackup_0", . . . ."mybackup_9" and then, after 10 days, if you run the batch it will delete the appropriate file so that you have no more than 10 backups (but all with unique names).

    If you change the batch file line "set Day=%Date:~8,1%" to "set Day=%Date:~7,2%" then two characters of the date number will be appended to the filename for a total of 31 maximum backups before old files are deleted in place of new ones.


    I had trouble getting the tasks to always run when sceduled with the ATI scheduler so I use the Windows Task Scheduler. That's a little more complicated to set up but it's worked very reliably for me.


    Hope that helps.
    sh
     
  3. Xpilot

    Xpilot Registered Member

    Joined:
    May 14, 2005
    Posts:
    2,318
    Gosh you guys make it seem complicated or perhaps the I over indulged at lunch !
    I run, thanks to True Image, an automated backup system. I could go away for an indefinite period and it would run in my absence. The only proviso being that the computer is turned on from time to time or is left running 24/7.
    The method could not be much simpler. I schedule whole disk backups to happen at a specifed time each day and if the computer is shut down at that time the backup will run at the subsequent restart. The backups are .tib images which are stored on a slave hard drive. The storage area is a secure zone and the neat trick is that Acronis manages the images on a FIFO basis with no manual intervention.
    To be even more secure I schedule further backups to be run and stored on an external USB 2 HDD.
    I know there are some users who decry the secure zone and take every opportunity to run it down however I am a definite fan provided it is on a slave drive and not just a partition of a solo HDD.

    Xpilot
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.