Skip to Content
ConfigurationBackup Server Mode

Overview

The backup server receives and stores backups from multiple client agents. It runs as a systemd service and is configured via a YAML file at /etc/xreplicator/server.yaml.

Priority order for configuration: CLI flags > Config file > Default values


Starting the Server

# Start the server sudo systemctl start backup-server # Enable automatic startup on boot sudo systemctl enable backup-server # Check status sudo systemctl status backup-server # View logs sudo journalctl -u backup-server -f

Configuration File

Location: /etc/xreplicator/server.yaml

sudo mkdir -p /etc/xreplicator sudo nano /etc/xreplicator/server.yaml

Parameters

ParameterTypeDefaultDescription
server.listen_addrstring":50051"gRPC listen address (host:port or :port)
server.repository_pathstring"./backup-repo"Path for storing backups (created if missing)
server.fixed_block_size_mbinteger8Fixed-block boundary size — must match agent config
server.log_levelstring"info"Options: "debug", "info", "warn", "error"
license.file_pathstring<repo>/license.jsonPath to license file
cloud.config_pathstring<repo>/cloud-config.yamlPath to cloud configuration file

server.fixed_block_size_mb must match the fixed_block_size_mb value in your agent configuration. A mismatch causes inefficient checkpoint resume.

Full Sample Config

# /etc/xreplicator/server.yaml server: listen_addr: "0.0.0.0:50051" repository_path: "/var/lib/backup/repo" fixed_block_size_mb: 8 log_level: "info" license: file_path: "/etc/xreplicator/license.json" cloud: config_path: "/etc/xreplicator/cloud-config.yaml"

Command-Line Flags

For quick testing or when not using systemd. CLI flags override the config file.

FlagDefaultDescription
--config/etc/xreplicator/server.yamlPath to config file
--listen":50051"gRPC listen address
--repo"./backup-repo"Repository path
--fixed-block-size8Fixed-block boundary size in MB
--cloud-config<repo>/cloud-config.yamlCloud config path
--license<repo>/license.jsonLicense file path

Systemd Service Configuration

Edit the service file:

sudo nano /etc/systemd/system/backup-server.service
[Unit] Description=Backup Server After=network.target [Service] Type=simple ExecStart=/usr/local/bin/xreplicator server --config /etc/xreplicator/server.yaml Restart=always RestartSec=10 [Install] WantedBy=multi-user.target

Using CLI Flags (Alternative)

[Service] Type=simple ExecStart=/usr/local/bin/xreplicator server \ --listen 0.0.0.0:50051 \ --repo /var/lib/backup/repo \ --fixed-block-size 8 \ --license /etc/xreplicator/license.json

After any edits:

sudo systemctl daemon-reload sudo systemctl restart backup-server

Repository Structure

/var/lib/backup/repo/ ├── storage/ │ ├── data/ # Chunks organized by hash prefix │ └── packs/ # Grouped pack files for efficiency ├── snapshots/ # Snapshot metadata (JSON) ├── index.db # SQLite index ├── cloud-config.yaml └── license.json

Configuration Examples

Minimal Setup

server: listen_addr: "0.0.0.0:50051" repository_path: "/var/lib/backup/repo" fixed_block_size_mb: 8

Production with Custom Block Size

server: listen_addr: "0.0.0.0:50051" repository_path: "/data/backup/repo" fixed_block_size_mb: 16 log_level: "info" license: file_path: "/etc/xreplicator/license.json"

Server with Cloud Config

server: listen_addr: "0.0.0.0:50051" repository_path: "/var/lib/backup/repo" fixed_block_size_mb: 8 cloud: config_path: "/etc/xreplicator/cloud-config.yaml"

Quick CLI Test (No systemd)

xreplicator server \ --listen 0.0.0.0:50051 \ --repo /var/lib/backup/repo \ --fixed-block-size 8

Override Config File Value

# Uses config file but overrides listen address xreplicator server \ --config /etc/xreplicator/server.yaml \ --listen 127.0.0.1:50051

License Requirements

The backup server requires a valid license to start. See the Licensing section for installation and troubleshooting details.

Last updated on