Still no progress bar from command line

Discussion in 'Acronis True Image Product Line' started by TI8, Apr 24, 2005.

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

    TI8 Guest

    Acronis Support,
    I am attaching my WIP script that I use to do my backups. This has been tested on both Win2K and XP using PHP 4.3.11. All backup (either full disk, incremental, etc.) are created successfully.

    I prefer to create individual images of each drive instead of the entire disk (smaller files for me are easier to work with, plus they fit on DVD better).

    Anyways, I added some simple outputs so I can see the progress, however, no Acronis progress is ever displayed (with or without the /progress command).

    Here is the script (I call it ATST so I can throw in a Star Wars reference):

    <?php
    // Acronis TrueImage Server Task (ATST)
    // Version 1.1

    /*
    Use ti_cons.exe /list to retrieve your disk information
    */

    error_reporting(0);

    ini_set("max_execution_time", "0");
    ini_set("error_log", "acronis_errors.txt");

    define("acronispath", "C:\\PROGRA~1\\Acronis\\TrueImage\\");
    define("acronisexe", "ti_cons.exe");

    $date = date("mdy");
    $debug = 0;
    $dodelete = 0;
    $doincremental = 0;
    $doentiredrive = 0;

    $tibs = array(
    "tib1" => array("drive" => "C", "progress" => "on", "hdd" => "1", "partition" => "1", "compression" => "3", "backup" => "K:\\"),
    "tib2" => array("drive" => "D", "progress" => "on", "hdd" => "1", "partition" => "2", "compression" => "3", "backup" => "K:\\"),
    "tib3" => array("drive" => "E", "progress" => "on", "hdd" => "1", "partition" => "3", "compression" => "3", "backup" => "K:\\"),
    "tib4" => array("drive" => "F", "progress" => "on", "hdd" => "1", "partition" => "4", "compression" => "3", "backup" => "K:\\"),
    "tib5" => array("drive" => "G", "progress" => "on", "hdd" => "2", "partition" => "1", "compression" => "3", "backup" => "L:\\"),
    "tib6" => array("drive" => "H", "progress" => "on", "hdd" => "2", "partition" => "2", "compression" => "3", "backup" => "L:\\"),
    "tib7" => array("drive" => "I", "progress" => "on", "hdd" => "2", "partition" => "3", "compression" => "3", "backup" => "L:\\"),
    "tib8" => array("drive" => "J", "progress" => "on", "hdd" => "2", "partition" => "4", "compression" => "3", "backup" => "L:\\"),
    );

    if ($doentiredrive == 0) {
    foreach($tibs as $tib) {
    $filename = $tib['backup'] . "Backup_" . $tib['drive'] . "_" . $date . ".tib";
    if (file_exists($filename)) {
    if ($dodelete == 1) {
    unlink($tib['backup'] . "Backup_" . $tib['drive'] . "_" . $date . ".tib");
    }
    }
    if ($doincremental == 1) {
    $cmdline = acronispath . acronisexe . " " . "/create /incremental" . " " . "/partition:" . $tib['hdd'] . "-" . $tib['partition'] . " " . "/filename:" . $tib['backup'] . "Backup_" . $tib['drive'] . "_" . $date . ".tib" . " " . "/progress:" . $tib['progress'] . " " . "/compression:" . $tib['compression'];
    } else {
    $cmdline = acronispath . acronisexe . " " . "/create" . " " . "/partition:" . $tib['hdd'] . "-" . $tib['partition'] . " " . "/filename:" . $tib['backup'] . "Backup_" . $tib['drive'] . "_" . $date . ".tib" . " " . "/progress:" . $tib['progress'] . " " . "/compression:" . $tib['compression'];
    }
    if ($debug == 1) {
    echo "Drive " . $tib['drive'] . " - Imaging..." . "\n";
    echo $cmdline . "\n";
    echo "Drive " . $tib['drive'] . " - Complete." . "\n";
    } else {
    echo "Drive " . $tib['drive'] . " - Imaging..." . "\n";
    exec($cmdline);
    echo "Drive " . $tib['drive'] . " - Complete." . "\n";
    }
    }
    }

    if ($doentiredrive == 1) {
    foreach($tibs as $tib) {
    if (!in_array($tib['hdd'], $tibs)) {
    $tibs[] = $tib['hdd'];
    $filename = $tib['backup'] . "Backup_" . $tib['drive'] . "_" . $date . ".tib";
    if (file_exists($filename)) {
    if ($dodelete == 1) {
    unlink($tib['backup'] . "Backup_" . $tib['drive'] . "_" . $date . ".tib");
    }
    }
    if ($doincremental == 1) {
    $cmdline = acronispath . acronisexe . " " . "/create /incremental" . " " . "/harddisk:" . $tib['hdd'] . " " . "/filename:" . $tib['backup'] . "Backup_Full_Disk_" . $tib['hdd'] . "_" . $date . ".tib" . " " . "/progress:" . $tib['progress'] . " " . "/compression:" . $tib['compression'];
    } else {
    $cmdline = acronispath . acronisexe . " " . "/create" . " " . "/harddisk:" . $tib['hdd'] . " " . "/filename:" . $tib['backup'] . "Backup_Full_Disk_" . $tib['hdd'] . "_" . $date . ".tib" . " " . "/progress:" . $tib['progress'] . " " . "/compression:" . $tib['compression'];
    }
    if ($debug == 1) {
    echo "Disk " . $tib['hdd'] . " - Imaging..." . "\n";
    echo $cmdline . "\n";
    echo "Disk " . $tib['hdd'] . " - Complete." . "\n";
    } else {
    echo "Disk " . $tib['hdd'] . " - Imaging..." . "\n";
    exec($cmdline);
    echo "Disk " . $tib['hdd'] . " - Complete." . "\n";
    }
    }
    }
    }

    ?>
     
  2. Acronis Support

    Acronis Support Acronis Support Staff

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

    Thank you for choosing Acronis Enterprise Disk Backup Software.

    Could you please send the letter to support@acronis.com along with the link to this tread? The contact us via e-mail is the most effective way to resolve your problems. If you do not receive any response from Acronis Support Team within 48 hours please let me know your Acronis Request # which will be sent to you in autoreply.

    Thank you.
    --
    Irina Shirokova
     
Thread Status:
Not open for further replies.