Skip to content

synology_backup_agent_install_linux.sh

Corey Watson edited this page Dec 1, 2025 · 1 revision

synology_backup_agent_install_linux.sh

Installs the Synology Active Backup for Business Agent on Linux systems with prerequisite validation.

Overview

This script automates the installation of Synology Active Backup for Business Agent on supported Debian/Ubuntu Linux systems. It performs comprehensive system requirement checks, downloads the agent package, extracts and installs it, then cleans up temporary files.

Purpose

Provides automated deployment of Synology's backup agent for Linux workstations and servers, ensuring all prerequisites are met before installation to prevent common installation failures.

Prerequisites

  • Operating Systems: Debian 10/11/12 or Ubuntu 16.04-24.04
  • Architecture: x86_64 only
  • Privileges: Root/sudo privileges required
  • Kernel Components: linux-headers for current kernel version
  • Build Tools:
    • make 4.1 or later
    • dkms 2.2.0.3 or later
    • gcc 4.8.2 or later
  • Utilities: unzip, curl or wget
  • Network: Internet access for package download

Configuration

Required Inputs

All configuration is hardcoded in the script:

  • Download URL: Points to Synology Active Backup Agent 2.7.1-3235 for x86_64 Debian systems
  • Temporary Directory: Auto-generated using mktemp -d

No parameters required - all inputs are embedded in the script.

Behavior

  1. Root Check: Verifies script is run with root privileges
  2. System Validation:
    • Checks CPU architecture (x86_64 required)
    • Verifies kernel headers are installed
    • Validates presence of required tools (make, dkms, gcc, unzip)
    • Checks versions of build tools meet minimum requirements
    • Identifies available download tool (curl or wget)
  3. Download Phase:
    • Downloads Synology Active Backup Agent ZIP archive to temporary directory
    • Uses curl or wget depending on availability
  4. Extraction:
    • Unzips the downloaded archive
    • Locates the install.run installer script
  5. Installation:
    • Executes the Synology installer with appropriate permissions
    • Monitors installation for errors
  6. Cleanup:
    • Removes temporary directory and all downloaded files
  7. Completion:
    • Displays success message
    • Provides usage instructions for abb-cli command

The script exits immediately on any error due to set -euo pipefail.

Security Notes

  • Requires root privileges for installation
  • Downloads package from official Synology global CDN
  • Uses HTTPS for secure download
  • Creates temporary directory with restricted permissions
  • Cleans up all temporary files after installation
  • No credentials stored in script

Exit Codes

  • 0: Installation completed successfully
  • 1: Installation failed (various reasons):
    • Script not run as root
    • Unsupported architecture (not x86_64)
    • Missing kernel headers
    • Missing required tools (make, dkms, gcc, unzip, curl/wget)
    • Tool version below minimum requirement
    • Download failed
    • Extraction failed
    • Installation failed

Example Output

[ SYNOLOGY ACTIVE BACKUP AGENT INSTALL - Linux ]
--------------------------------------------------------------

[ SYSTEM CHECKS ]
--------------------------------------------------------------
Architecture : x86_64
Kernel : 5.15.0-91-generic
Headers : Found
Tools : make, dkms, gcc, unzip - OK
make : 4.3 (>= 4.1 required) - OK
dkms : 2.8.7 (>= 2.2.0.3 required) - OK
gcc : 11.4.0 (>= 4.8.2 required) - OK

[ DOWNLOAD ]
--------------------------------------------------------------
Downloading Synology Active Backup Agent...
Download completed

[ EXTRACT ]
--------------------------------------------------------------
Extracting installer...
Extraction completed

[ INSTALL ]
--------------------------------------------------------------
Running installer...

[ CLEANUP ]
--------------------------------------------------------------
Removing temporary files...
Cleanup completed

[ FINAL STATUS ]
--------------------------------------------------------------
Result : SUCCESS
Synology Active Backup Agent installed successfully

To connect to your NAS: abb-cli -c
For help: abb-cli -h

[ SCRIPT COMPLETED ]
--------------------------------------------------------------

Version History

  • v1.0.0: Initial release
    • Automated installation with prerequisite checks
    • Support for Debian/Ubuntu x86_64 systems
    • Version validation for build tools
    • Agent version 2.7.1-3235

Links

Clone this wiki locally