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 -fConfiguration File
Location: /etc/xreplicator/server.yaml
sudo mkdir -p /etc/xreplicator
sudo nano /etc/xreplicator/server.yamlParameters
| Parameter | Type | Default | Description |
|---|---|---|---|
server.listen_addr | string | ":50051" | gRPC listen address (host:port or :port) |
server.repository_path | string | "./backup-repo" | Path for storing backups (created if missing) |
server.fixed_block_size_mb | integer | 8 | Fixed-block boundary size — must match agent config |
server.log_level | string | "info" | Options: "debug", "info", "warn", "error" |
license.file_path | string | <repo>/license.json | Path to license file |
cloud.config_path | string | <repo>/cloud-config.yaml | Path 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.
| Flag | Default | Description |
|---|---|---|
--config | /etc/xreplicator/server.yaml | Path to config file |
--listen | ":50051" | gRPC listen address |
--repo | "./backup-repo" | Repository path |
--fixed-block-size | 8 | Fixed-block boundary size in MB |
--cloud-config | <repo>/cloud-config.yaml | Cloud config path |
--license | <repo>/license.json | License file path |
Systemd Service Configuration
Using a Config File (Recommended)
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.targetUsing 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.jsonAfter any edits:
sudo systemctl daemon-reload
sudo systemctl restart backup-serverRepository 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.jsonConfiguration Examples
Minimal Setup
server:
listen_addr: "0.0.0.0:50051"
repository_path: "/var/lib/backup/repo"
fixed_block_size_mb: 8Production 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 8Override Config File Value
# Uses config file but overrides listen address
xreplicator server \
--config /etc/xreplicator/server.yaml \
--listen 127.0.0.1:50051License Requirements
The backup server requires a valid license to start. See the Licensing section for installation and troubleshooting details.
Last updated on