CLI Overview
Get started with the BackupEngine command-line interface for automation, scripting, and headless operation.
Dual-Mode Agent
The BackupEngine desktop agent operates in two modes: a graphical user interface (GUI) for interactive use, and a command-line interface (CLI) for automation, scripting, and headless server environments. Both modes share the same backup engine, configuration, and encryption — they are two interfaces to the same underlying agent.
- •GUI mode: Launched from the Start menu, Dock, or application launcher. Best for interactive setup and monitoring.
- •CLI mode: Invoked from a terminal or script using the backupengine command. Best for automation, scheduled tasks, and headless servers.
- •Both modes can run simultaneously. Changes made in one mode are reflected in the other.
- •The CLI provides all functionality available in the GUI, plus additional features for scripting and automation.
When to Use the CLI
The CLI is the preferred interface for several common scenarios.
- •Headless servers: Windows Server Core, Linux servers, and other environments without a desktop.
- •Automation: Integrating BackupEngine into RMM tools (ConnectWise, Datto, NinjaRMM) or CI/CD pipelines.
- •Scripting: Writing PowerShell or bash scripts that include backup and restore operations.
- •Monitoring: Querying backup status programmatically with JSON output for dashboards and alerting.
- •Bulk operations: Managing backup sets, schedules, and configurations across multiple machines.
Installation and Setup
The CLI is included with the standard BackupEngine desktop agent installer. No separate installation is needed.
# Check that the CLI is available backupengine --version # Output: BackupEngine CLI v2.4.1 # The installer adds backupengine to your PATH automatically. # If the command is not found, add the installation directory to your PATH: # Windows (PowerShell) $env:PATH += ";C:\Program Files\BackupEngine\" # macOS / Linux export PATH="$PATH:/usr/local/bin/backupengine"
Authentication
Before using the CLI, you need to authenticate with your BackupEngine account. Authentication is performed once and the session is stored securely on your device.
# Interactive login (prompts for email, password, and MFA code) backupengine auth login # Login with credentials (for scripting — password is read from stdin) echo "$BACKUP_PASSWORD" | backupengine auth login --email user@example.com --stdin-password # Check authentication status backupengine auth status # Logout backupengine auth logout
⚠ Warning
💡 Tip