Avamar: Avtar Fails When Run-at-Start Script Returns Non‑Zero Exit Code

Summary: Backups fail when a user‑defined run‑at‑start script is used because the script returns exit code 1; avtar treats any non‑zero code as an error (such as, "avtar Info: Back from run‑at‑start, exit code 1"). Correct the script to exit 0 to resolve. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

Backup failures when using a run‑at‑start script

Backups do not complete when a custom run‑at‑start script is configured for avtar.

  • Avtar logs indicate it returned from the run‑at‑start script with a non‑zero exit code.
  • Backup jobs are marked as failed.
  • Disabling the run‑at‑start script allows the backup to succeed.
avtar Info : Back from run-at-start, exit code 1
avtar Error : Exiting avtar with run-at-start script failure 1

Cause

Improper Exit Code from Run‑at‑Start Script

The backup fails because the custom run‑at‑start script returns an exit code other than . In Linux/UNIX environments, is the only value that indicates success. Avtar interprets any non‑zero value as a script failure, causing the backup process to abort.

  • The script returned exit code , which avtar logged as an error.
  • Avamar treats this non‑zero exit code as a failure and stops the backup operation.

Relevant log entry:

avtar Info : Back from run-at-start, exit code 1
avtar Error : Exiting avtar with run-at-start script failure 1

Resolution

Correcting avtar run‑at‑start script failures

Step‑by‑step resolution

When a customized run‑at‑start script returns a non‑zero exit code, avtar treats the backup as failed. Follow these steps to ensure the script returns on success.

  • Locate the script configured for the avtar run‑at‑start phase (such as, /opt/avamar/etc/run_at_start.d/custom_script.sh ).
  • Open the script in an editor and verify the logic that determines success or failure.
  • At the end of the script, add or modify the exit statement so that a successful execution ends with exit 0 .
  • Ensure any error paths also use appropriate non‑zero codes only when a genuine failure occurs.
  • Save the changes and set executable permissions if they are not already set.

Example of a proper script termination:

#!/bin/bash
# Your custom logic here

if [ $? -eq 0 ]; then
    echo "Custom script completed successfully"
    exit 0
else
    echo "Custom script encountered an error"
    exit 1
fi

 

Validate the script locally

Run the script manually and confirm it exits with .

$ /opt/avamar/etc/run_at_start.d/custom_script.sh
Custom script completed successfully
$ echo $?
0

 

Restart avtar and trigger a backup.

After confirming the script returns 0, restart the avtar service and start a backup job to verify normal operation.

# Restart avtar service
$ systemctl restart avtar

# Initiate a test backup (replace and as needed)
$ avtar -c -p -b

 

Confirm the resolution.

Check the avtar log for the absence of the error message "Exiting avtar with run‑at‑start script failure 1." A successful log entry resembles the following:

[2025-10-09 12:34:56] INFO avtar Info : Back from run-at-start, exit code 0
[2025-10-09 12:35:10] INFO Backup completed successfully

 

CAUTION: Do not ignore non‑zero exit codes; they indicate genuine errors that must be addressed before proceeding.
CAUTION: Modifying the run‑at‑start script incorrectly can cause backup failures for all clients using that policy. Test changes in a non‑production environment first.
NOTE: If you are unable to modify the script or the issue persists after applying the steps above, contact Dell Support for additional assistance.

Affected Products

Avamar

Products

Avamar Client, Avamar Client for Linux, UNIX, MacOSX
Article Properties
Article Number: 000210566
Article Type: Solution
Last Modified: 23 Oct 2025
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.