Trigger Acronis Backup Task by command line

Discussion in 'Acronis True Image Product Line' started by spiekey, Oct 28, 2006.

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

    spiekey Registered Member

    Joined:
    Oct 4, 2006
    Posts:
    9
    Hello,

    is there a way to trigger /start a Acronis Backup task from the command line?
    Something like "acronis.exe -runtask backup1" ?

    Thanks, Mario
     
  2. sikkalgopal

    sikkalgopal Registered Member

    Joined:
    Nov 1, 2006
    Posts:
    1
    I am also looking for the same.I am evaluating acronis true image home version 10.0.If any syntax available,will be apreciated :)
     
  3. foghorne

    foghorne Registered Member

    Joined:
    Sep 27, 2005
    Posts:
    1,389
    Location:
    Leeds, Great Britain
    Hi sikkalgopal

    In previous versions, I believe command line control has not been available with Home versions - i.e. I think you need the Workstation or Server version.

    Since these products don't appear to be available for V10 yet, it seems you cannot do this at all with V10 at the moment.

    F.
     
  4. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    You can execute an Acronis task but you have to first identifying the task file (they are typically stored in Documents and Settings\All Users\Applicaton Data\Acronis\Trueimage\Scripts and have the extension "tis".

    To know which one is which, edit a task in Acronis and save it then note the time, then look for which script has that date and time.

    To execute a task file you call the Trueimage service using a command line like this where yuou fill in the appropriate path and filename in place of the [bracketed portion]:


    "C:\Program Files\Common Files\Acronis\TrueImage\TrueImageService.exe" /script:"[drive:path\scriptname.tis]"

    You can also use this command line in a Windows Task Scheduler file if you want to execute tasks on schedule on a computer where you need to wake the computer from standby (S3) to run the task. The Acronis scheduler won't wake the computer from standby but the Win scheduler will.
    Depending where you call the task from, you might have to remove the first set of quotes around the command file path and name.

    Have fun,
    sh
     
  5. foghorne

    foghorne Registered Member

    Joined:
    Sep 27, 2005
    Posts:
    1,389
    Location:
    Leeds, Great Britain
    Thanks for the info.

    F.
     
  6. epack

    epack Registered Member

    Joined:
    Sep 20, 2006
    Posts:
    15
    Location:
    Charlottesville, VA
    I'm a new TI9 user, and need to know this as well, as I want to keep multiple versions of my backups and am aware of the post command/verify timing issue. I've started with the rename bat file, and while it essentially works, I'm not sure how to get it to silence the OK prompt and exit the program when being run unattended. Rightly or wrongly this is what I have in my bat file, and except for the problem mentioned, it did in fact work fine:

    c: [first 2 commands somewhat unnecessary but don't hurt]
    cd \
    cd "Program Files\Common Files\Acronis\TrueImage"
    trueimageservice /script:testtask.tis [I moved it here to shorten path]
    g:
    cd /d backups
    if exist mybackup.tib namedate /U /y /Z:"Y-m-d" mybackup.tib

    It worked fine, except that when the TI job finished, it had an OK? prompt that paused it. The rename part worked fine once I manually responded, so I need to know if/how I can get either get rid of or respond to the prompt so it will finish and eventually exit without intervention. Am I just missing something?

    TIA

    elaine
    charlottesville,va
     
  7. MarcR

    MarcR Registered Member

    Joined:
    Nov 3, 2006
    Posts:
    60
    I use windows task scheduler and I've set it up as follows. Note: Your *.tis file name will vary (you need to set up the tasks in True Image first). Then, using a text editor, open each *.tis file to determine it's name (e.g., Full Week A, Append Week A, etc.).

    This will keep two weeks of backups. I have two backup folders (Week A and Week B). 1 and 2 below are configured (in Acronis) to create images in folder Week A. 3 and 4 are set up create images in folder Week B.

    This is the name, schedule and run command for Windows Task Scheduler:

    1-Image Full Week A (Every Saturday of Every Two Weeks)

    "C:\Program Files\Common Files\Acronis\TrueImage\TrueImageService.exe" /script:"C:\Documents and Settings\All Users\Application Data\Acronis\TrueImage\Scripts\0C4B52E0-C929-4B1C-8018-407CF3D83EA3.tib.tis"

    2-Image Incremental Week A (Every Mon, Tue, Wed, Thu, Fri, Sun of Every Two Weeks)

    "C:\Program Files\Common Files\Acronis\TrueImage\TrueImageService.exe" /script:"C:\Documents and Settings\All Users\Application Data\Acronis\TrueImage\Scripts\0EF5EA09-7660-4BD7-BDB3-CC9ADF39BC36.tib.tis"

    3-Image Full Week B (Every Saturday or Every Two Weeks)

    "C:\Program Files\Common Files\Acronis\TrueImage\TrueImageService.exe" /script:"C:\Documents and Settings\All Users\Application Data\Acronis\TrueImage\Scripts\B8C2F28D-F5D8-46E6-BE8D-C2B300D9E642.tib.tis"

    4-Image Incremental Week B (Every Mon, Tue, Wed, Thu, Fri, Sun of Every Two Weeks)

    "C:\Program Files\Common Files\Acronis\TrueImage\TrueImageService.exe" /script:"C:\Documents and Settings\All Users\Application Data\Acronis\TrueImage\Scripts\3946A2F8-691D-4586-A921-6E9F9ABD1E7F.tib.tis"

    Note: You'll have to configure the start dates in Windows Task Scheduler so the tasks run on the correct date the first time they run.
     

    Attached Files:

    Last edited: Nov 5, 2006
  8. jeremyotten

    jeremyotten Registered Member

    Joined:
    Feb 9, 2005
    Posts:
    684
    can this task also be done for a restore...
     
  9. epack

    epack Registered Member

    Joined:
    Sep 20, 2006
    Posts:
    15
    Location:
    Charlottesville, VA
    But how do you get past the OK prompt?

    elaine
     
  10. MarcR

    MarcR Registered Member

    Joined:
    Nov 3, 2006
    Posts:
    60
    There is no OK prompt if setup as I've described. I have tested it with True Image Server 8 and True Image Workstation 9.1
     
  11. MarcR

    MarcR Registered Member

    Joined:
    Nov 3, 2006
    Posts:
    60
    I don't know - I have no need for an automated restore. It probably can, but I don't have the parameters.

     
  12. epack

    epack Registered Member

    Joined:
    Sep 20, 2006
    Posts:
    15
    Location:
    Charlottesville, VA
    Interesting. I guess I'll have to try it, but I'll admit I don't understand why an ack would go away just by using the win scheduler. Or maybe it has something to do with the version of TI? I'm using 9.1. From what I can see, that's the major difference in my bat set up vs yours. If you run ATI "manually" do you get that OK at the end? Yes? No? If not, then this could be why it works for you.

    Thanks

    elaine
     
  13. MarcR

    MarcR Registered Member

    Joined:
    Nov 3, 2006
    Posts:
    60
    I have never experienced an ack or OK. I'm using Workstation 9.1.
     
  14. epack

    epack Registered Member

    Joined:
    Sep 20, 2006
    Posts:
    15
    Location:
    Charlottesville, VA
    I wonder if the OK prompt is because I'm using the home version, and maybe Workstation is designed to allow unattended operation in a corporate venue? That would make a certain amount of sense. I've emailed the question to Acronis, tho, so hopefully someone will respond. I'll post any relevant response here.

    elaine
     
  15. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    Nope, I've used the home version 9 and 10 with batch files and not had prompts. Is the prompt an ATI message or a windows message coming from a command inthe batchfile?

    If from the batchfile comand, that command might have switch for no prompting.
     
  16. epack

    epack Registered Member

    Joined:
    Sep 20, 2006
    Posts:
    15
    Location:
    Charlottesville, VA
    No, it is definitely an ATI message--it's not showing up in the DOS window, but rather in the ATI window as I observe it running my test. There is no pause or other similar command in the bat file--it's exactly what I posted here on 11/4 (#6 in this thread). I didn't see any kind of option in ATI to add a confirmation, but maybe I missed it? I'll look at it again. Acronis has not yet responded to my question about this, but if/when they do, I'll pass it on.

    elaine
     
  17. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    There are a couple of options when setting up a post command you can try switching those.

    sh
     
  18. epack

    epack Registered Member

    Joined:
    Sep 20, 2006
    Posts:
    15
    Location:
    Charlottesville, VA
    I don't run any post commands, as it happens, but I just figgered it out.

    I have the test bat file sitting on my desktop for easy access, and have been just clicking on it to kick off the job. It runs in a DOS window, of course, and I've been watching it to see what happens. Well, I also noticed that it had an ATI systray icon running so I just clicked on it to watch THAT part of it. When it finished, I got the OK prompt (which was just for something like "This job has successfully completed".)

    I tried it a second time, but this time did NOT open the ATI systray icon while the bat was running, and BINGO! It went from start to finish flawlessly. Everything else worked exactly the same, but for whatever reasons, it didn't show the OK prompt this time and went to a full completion.

    Now this is not a scheduled job (yet), it's just a simple bat file that I kicked off manually. Why I'm seeing the prompt in the ATI interface and not when iI don't view the interface (both via the bat file), I have no idea. Note that in the interface I did NOT touch anything, it was already running--I was just viewing it.

    OTOH, why mess with success?? :) Far as I'm concerned it's working now, so life is good!

    Cheers!

    elaine
     
Thread Status:
Not open for further replies.