Backup Agents

Enterprise-grade backup agents for full machine protection. Install agents on your servers for automated file-level, block-level, and image backups with deduplication.

v1.0.0Updated 2026-01-01
Linux
Ubuntu, Debian, RHEL, CentOS
Windows
Server 2016+, Windows 10/11
macOS
Monterey 12+

Features

  • File-level backup with include/exclude patterns
  • Block-level backup with Changed Block Tracking (CBT)
  • Full image backup for bare-metal recovery
  • Incremental and differential backup modes
  • Global deduplication with content-addressable storage
  • In-flight compression (gzip, zstd, lz4)
  • Client-side encryption (AES-256)
  • Bandwidth throttling for production environments
  • Pre/post backup scripts
  • Centralized management from LOX dashboard

Quick Start

1. Register Agent in Dashboard

First, register a new agent in the LOX dashboard:

  1. 1. Go to Dashboard → Backup Agents
  2. 2. Click Add Agent
  3. 3. Enter the hostname and select the operating system
  4. 4. Click Register Agent
  5. 5. Copy the installation command shown

2. Install Agent on Server

Linux

curl -sSL https://get.lox.backup/agent | sudo bash -s -- \
  --api-url https://api.lox.backup \
  --agent-uuid <AGENT_UUID> \
  --token <REGISTRATION_TOKEN>

Windows (PowerShell as Administrator)

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://get.lox.backup/agent.ps1" -OutFile "$env:TEMP\install-lox-agent.ps1"
& "$env:TEMP\install-lox-agent.ps1" -ApiUrl "https://api.lox.backup" -AgentUuid "<AGENT_UUID>" -Token "<REGISTRATION_TOKEN>"

macOS

curl -sSL https://get.lox.backup/agent | bash -s -- \
  --api-url https://api.lox.backup \
  --agent-uuid <AGENT_UUID> \
  --token <REGISTRATION_TOKEN>

Install Command

The exact install command with your agent UUID and token is available in the dashboard after registering the agent. Click Install on any agent to see it.

Backup Jobs

After the agent is installed and online, create backup jobs from the dashboard or via API.

Job Types

TypeDescriptionUse Case
fileFile-level backup with patternsDocuments, configs, home directories
blockBlock-level with CBTVMs, large databases, minimal transfer
imageFull disk/volume imageBare-metal recovery, system migration
databaseApplication-aware database backupMySQL, PostgreSQL, MongoDB with VSS

Backup Modes

ModeDescriptionStorage
fullComplete backup of all dataHighest (baseline)
incrementalOnly changes since last backupLowest (requires chain)
differentialChanges since last full backupMedium (only needs full)

Example: File Backup Job (API)

POST /api/v1/backup-jobs
{
  "agent_uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Daily Web Files",
  "job_type": "file",
  "backup_mode": "incremental",
  "source_paths": [
    "/var/www",
    "/etc/nginx",
    "/etc/letsencrypt"
  ],
  "exclude_patterns": [
    "*.log",
    "*.tmp",
    "node_modules/",
    ".git/"
  ],
  "schedule_cron": "0 2 * * *",
  "retention_count": 30,
  "compression_enabled": true,
  "encryption_enabled": true
}

Job Configuration

Basic Settings

FieldTypeDescription
namestringJob display name
job_typefile|block|image|databaseBackup type
backup_modefull|incremental|differentialBackup mode (default: incremental)
source_pathsstring[]Paths/volumes to backup
schedule_cronstringCron expression (null = manual only)
retention_countintegerNumber of backups to retain (default: 7)

File Patterns

FieldDescription
exclude_patternsGlob patterns to exclude (*.log, temp/, etc.)
include_patternsOnly include files matching these patterns

Advanced Settings

FieldDefaultDescription
compression_enabledtrueEnable zstd compression
encryption_enabledfalseEnable AES-256 encryption
deduplication_enabledtrueEnable block-level deduplication
bandwidth_limit_mbpsnullMax upload bandwidth (null = unlimited)
pre_scriptnullScript to run before backup
post_scriptnullScript to run after backup

Restore Options

Restore Types

TypeDescription
fullRestore entire backup to original or new location
fileRestore individual files or folders
volumeRestore entire volume (block/image backups)
instantMount backup as live volume (read-only)

Restore via API

# Full restore to original location
POST /api/v1/machine-backups/{backup_uuid}/restore
{
  "restore_type": "full",
  "overwrite_existing": true,
  "preserve_permissions": true
}

# Restore specific files
POST /api/v1/machine-backups/{backup_uuid}/restore
{
  "restore_type": "file",
  "target_path": "/tmp/restore",
  "selected_files": [
    "/etc/nginx/nginx.conf",
    "/var/www/html/index.php"
  ]
}

Agent Configuration

Configuration File

The agent configuration is stored in:

  • Linux/macOS: /etc/lox-agent/config.yaml
  • Windows: C:\ProgramData\LOX Agent\config.yaml
# /etc/lox-agent/config.yaml
api_url: https://api.lox.backup
agent_uuid: 550e8400-e29b-41d4-a716-446655440000
registration_token: lox_agt_xxxxxxxxxxxxx

# Heartbeat interval (seconds)
heartbeat_interval: 60

# Log level: debug, info, warn, error
log_level: info

# Working directory for temp files
work_dir: /var/lib/lox-agent

# Max concurrent backup jobs
max_concurrent_jobs: 2

# Network settings
bandwidth_limit_mbps: 100
retry_count: 3
retry_delay_seconds: 30

Deduplication

The agent uses content-addressable storage with variable-size chunking for efficient deduplication:

  • Variable-size chunks (4KB - 4MB) using rolling hash
  • SHA-256 content addressing
  • Cross-job deduplication within tenant
  • Typical dedup ratio: 5:1 to 20:1

Storage Efficiency

With deduplication enabled, incremental backups typically transfer only 1-5% of total data. A 100GB server with daily backups might use only 110GB total storage for 30 days of history.

Security

End-to-End Encryption

When encryption is enabled, data is encrypted on the agent before transmission. LOX never sees your encryption keys - they stay on your server.

  • TLS 1.3 for all API communication
  • Token-based authentication per agent
  • Optional client-side AES-256-GCM encryption
  • Token rotation from dashboard

Monitoring

Agent Health

The agent sends heartbeats every 60 seconds. An agent is marked offline if no heartbeat is received for 5 minutes.

Prometheus Metrics

# Agent exposes metrics on :9100/metrics
lox_agent_backup_total{job="web-files",status="success"}
lox_agent_backup_total{job="web-files",status="failed"}
lox_agent_backup_duration_seconds{job="web-files"}
lox_agent_backup_size_bytes{job="web-files"}
lox_agent_backup_files_count{job="web-files"}
lox_agent_dedup_ratio{job="web-files"}
lox_agent_upload_speed_bytes_per_second
lox_agent_heartbeat_timestamp

Troubleshooting

Agent shows "Offline"

Check the agent service is running: systemctl status lox-agent. Verify network connectivity to api.lox.backup and check firewall rules for outbound HTTPS.

Backup job fails with permission error

The agent runs as root by default. If running as a different user, ensure it has read access to all source paths. For VSS backups on Windows, the service must run as SYSTEM.

Slow backup speed

Check if bandwidth limiting is configured. First backup is always slower due to full transfer. Subsequent incremental backups should be much faster.

Debug mode

Set log_level: debug in config.yaml and restart the agent. Logs are in /var/log/lox-agent/ (Linux) or Event Viewer (Windows).

Service Management

Linux (systemd)

# Start/stop/restart
sudo systemctl start lox-agent
sudo systemctl stop lox-agent
sudo systemctl restart lox-agent

# View status
sudo systemctl status lox-agent

# View logs
sudo journalctl -u lox-agent -f

Windows

# PowerShell (Administrator)
Start-Service "LOX Backup Agent"
Stop-Service "LOX Backup Agent"
Restart-Service "LOX Backup Agent"

# View status
Get-Service "LOX Backup Agent"