1846: Post Commands Fail in Acronis True Image Echo Server for Linux

use Google Translate

Post commands fail to run in Acronis True Image Echo Server for Linux. Operation log shows that the commands were run successfully

This article applies to:

Symptoms

  1. In Acronis True Image you provide a bash script as a post backup command. See Using Batch Files in Acronis True Image;
  2. Acronis True Image fails to run the provided bash script without showing any error message or indicating it in the log.

(!) Hitting the button Test command on the Edit command window will successfully execute the provided bash script. However, after the actual backup operation, Acronis True Image will still fail to run the bash script.

Cause

Issue in the product.

Solution

  1. Download pre_command.tar;

  2. Unpack it:

    tar xf pre_command.tar

  3. Make the script executable:

    chmod +x pre_command.sh

  4. Open the script in any text editor. Add the necessary commands to the end of the script. These commands will be executed as a post backup command;

  5. Run the backup task with the edited script specified as a pre-command. See Using Batch Files in Acronis True Image.

(!) Do not check the option Do not perform operations until the command's execution is complete.

More information

The pre_command.sh script does the following:

  • After start it detects the pid of its parent process;

  • If parent is Acronis True Image GUI, then this means that this is a test execution with the Test command button. The script then just exits;

  • If parent is TrueImageService, then this means that this is a backup job;

    • The script waits for parent process to finish, periodically checking the presence of it in the list of running tasks;

    • When parent task is not present in the list, the script continues to work, executing further instructions.

You can modify the time between periodic checks of presence of parent process: see the SLEEP_TIME variable in the script. Current script will be checking the process ID every 10 seconds.

Tags: 

You are reporting a typo in the following text:
Simply click the "Send typo report" button to complete the report. You can also include a comment.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
1 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.