17541: Collecting Strace Output in Linux

use Google Translate

Operating Systems: 

Last update: 13-01-2014

Collecting system calls output in Linux

This article applies to:

  • Acronis Backup & Recovery 11
  • Acronis Backup & Recovery 10

For Acronis Backup & Recovery 11.5 see Acronis Linux Products: collecting Strace output of Acronis services in Linux

Introduction

For debugging purposes, you can generate an output of system calls made by an Acronis product in Linux (strace).

Solution

GUI

    1. Install strace package if it has not been installed (installation instructions depend on the operatings system);
    2. Rename the backup and recovery daemon:

For Acronis Backup and Recovery 10:

# mv /usr/lib/Acronis/BackupAndRecoveryAgent/BackupAndRecoveryService\ /usr/lib/Acronis/BackupAndRecoveryAgent/Agent

For Acronis Backup and Recovery 11:

# mv /usr/lib/Acronis/Agent/acronisagent /usr/lib/Acronis/Agent/agent

    1. Launch the console:

      # acronis_console &

      and create a new task. The task should be scheduled to a manual start.

      You can find the script of the newly created task in the /var/lib/Acronis/TrueImage/Scripts/ directory (choose the latest if there are several scripts).

    2. Launch the daemon under the strace:

      # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/Acronis/system_libs:/usr/lib/Acronis/Common:\ /usr/lib/Acronis/BackupAndRecovery/Common

      For Acronis Backup and Recovery 10:

      # /usr/bin/strace -fF -s 1024 -o /root/strace.log /usr/lib/Acronis/BackupAndRecoveryAgent/Agent\ -script:/var/lib/Acronis/TrueImage/Scripts/[ScriptName].tmp.tib.tis

      For Acronis Backup and Recovery 11:

      # /usr/bin/strace -fF -s 1024 -o /root/strace.log /usr/lib/Acronis/Agent/agent\ -script:/var/lib/Acronis/TrueImage/Scripts/[ScriptName].tmp.tib.tis

      Example:

      # /usr/bin/strace -fF -s 1024 -o /root/strace.log /usr/lib/Acronis/Agent/agent\ -script:/var/lib/Acronis/TrueImage/Scripts/AAF7A67A-32B5-C4F5-F846-3B0F1BB2CD85.tmp.tib.tis

    3. Reproduce the issue;
    4. The strace log file will be located in /root/strace.log.
    5. Rename the daemon back:

Acronis Backup and Recovery 10:

# mv /usr/lib/Acronis/BackupAndRecoveryAgent/Agent\ /usr/lib/Acronis/BackupAndRecoveryAgent/BackupAndRecoveryService

Acronis Backup and Recovery 11

# mv /usr/lib/Acronis/Agent/agent /usr/lib/Acronis/Agent/acronisagent

CLI

Use the following command to gather the strace output in Acronis Backup and Recovery 10:

# /usr/bin/strace -fF -ttt -s 1024 -o /root/strace.log /usr/sbin/trueimagecmd [options]

or for Acronis Backup and Recovery 11

# /usr/bin/strace -fF -ttt -s 1024 -o /root/strace.log /usr/sbin/acrocmd [options]

Example:

# /usr/bin/strace -s 1024 -fF -ttt -o /root/cli.log /usr/sbin/acrocmd --create --partition:1-1 --filename:/backup.tib

More information

Tags: