Aller au contenu principal

running backup plan from command on server

Thread solved

63908: Acronis Cyber Backup 12.5: How to run backup task using batch file

See my attached image for what I am trying to do.

Run backup from batch file need proper format.

  1. I want to select a backup plan
  2. I want to run selected plan
  3. I want to see it run in the activities
  4. I am on the server, as I understand it this is the only place you have acrocmd installed.

2. Create a new .txt file with the following contents:

acrocmd run task --id=<XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>

Where XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX is the the task id, identified at previous step, e.g. acrocmd run task --id=69BFE35A-3CB9-4705-857E-0BA950F45CA2

3. Save the file and change its extension to .bat

Now you can start the backup by double-clicking the created batch file.

Results of the backup launched this way will be displayed in the list of activities same as for backup launched via GUI.

This gives me a error when I run it.

An error occurred while executing the command.
    Error: 0x1510008
    $module = "acrocmd_vsa64_16327"
    `anonymous-namespace'::PrintPerformingResult : d:\204\enterprise\command_line\engine\impl\engine.cpp(65)
The ID is not defined.
    Error: 0x1510026
    $module = "abr11cli_vsa64_16327"
    CommandLine::GetID : d:\204\enterprise\command_line\abr11\commands\utils\impl\id_retriever.cpp(35)

 

Fichier attaché Taille
Capture.PNG 79.39 Ko
0 Users found this helpful

Hello E.J. McNaughton!

You have acrocmd on any machine where you installed it. If you add machines remotely through the gui it won't be installed though. The most scalable option is to distribute an unattended acronis installation that includes it so you have it on each machine.

You can also run acrocmd command on another machine with an agent with the "--host" and "--credentials" paramters.

Here's some pseudocode to do what you want:

  1. enumerate the machines you want to backup this way with an agent installed. Some pointers on how to do this here. Short version: Query acronis db with SQL, or create a scheduled report and save it to some format.
  2. For each machine:
    1. Query tasks with someinthg like: acrocmd list tasks --host=machine_to_backup
      --credentials=domain\yourhostadmin,password --output=raw
    2. From the output find the row with the name of your backup plan and extract the guid
    3. run the task with: acrocmd run task --id=extracted_id --host=machine_to_backup
      --credentials=domain\yourhostadmin,password
  3. Running both of these commands I saw the resulting backup activity in the activity log.

The error you get is because the plan as it's applied to a machine results in a unique guid for each machine and only available to be run in the context of that machine. When you run it on the server as you experienced the id doesn't exist, hence the error.

-- Peter