On this page

2.2 The server

The server pdc-server is a single process that combines the web interface, scheduling, run control, catalog, certificate authority and repository maintenance. This page describes its parts and its operation as a service; if you only want to run the server, the practical side is in chapter 03 Installation and chapter 14 Operations and FAQ.

Overview of the parts

Part

Task

Web layer

HTTPS listener (default 0.0.0.0:8443) with the embedded web interface and REST API; sign-in, sessions, role checks

Agent endpoint

Second listener (default 0.0.0.0:8444) for the agents' connection and the restic REST protocol, with mutual TLS

Scheduler

Detects due jobs, makes up missed ones, triggers "after job X" chains

Runner (run control)

Creates runs, hands them to agents or runs them itself, limits parallelism, processes agent events, applies retention

Catalog

SQLite database with everything the server knows

Internal CA (PKI)

Issues server and agent certificates, checks revocations

Repository service

Opens repositories with the master key: browse, ZIP download, forget, prune, check, copy, synthetic full

Notifications and reports

Channels, rules, daily and weekly reports, condition checks

Deployment

Push installation, discovery, signed agent packages, self-update

Others

Wake-on-LAN, power management, ransomware analysis, protection status, quotas, blackout windows, rotated-drive watcher, four-eyes approvals

Scheduler

The scheduler runs in a loop. On each pass it handles the jobs that are due and then waits at most 15 seconds or until an event wakes it (for example a new or changed job). Its properties:

  • Times are local server time.

  • Schedule kinds: daily, weekly, monthly, cron, after another job, manual and rules. The options are in chapter 07 Schedules and Plans.

  • A schedule can have a window in which its runs may start.

  • Catch-up: If runs were due while the server was off or asleep (more than 5 minutes overdue), one run is created once with the strongest due backup type, provided catch_up is on (default). Without catch_up the missed time is skipped.

  • Blackout windows are independent of a job's window. A run that falls due during a blackout is created and waits; several missed times merge into one run.

  • Once a minute the server checks conditions for notifications (agent offline for a long time, repository nearly full, certificate expiring) and reconciles the automation rules. Hourly it deletes old run logs (run_log_days, default 90) and stale lock files left by agents.

  • Daily at config_backup_time (default 03:30) it backs up its configuration; reports run according to [reports].

Runner, run phases and limits

The runner turns a job and a point in time into a run. Runs of kinds backup, restore, verify, instant, mount and scan go to an agent; maintenance, check, copy, config_backup and the synthetic full are executed by the server itself (see section 2.1 Architecture overview).

The runner counts the limits from the catalog, so they survive a restart of the server:

Setting

Default

Effect

max_jobs_per_agent

1

Concurrent jobs on one agent

max_jobs_per_repository

2

Concurrent backups and maintenance runs on one repository

max_server_encryption_runs

1

Concurrent backups into repositories with server-side encryption (1 to 16)

offline_run_timeout_minutes

15

A running job whose agent stays offline this long is treated as failed

When a limit applies, the run stays in the queue; the interface names the reason. Instant recovery sessions do not count against the limits.

During a run the server tracks the phase: what the agent is doing right now (scanning, reading, uploading โ€ฆ), which waits on the server occur (for example server_index while the index view is built for an agent in per_machine_index mode) and why a run is queued. The live state reaches the interface in real time; after the run ends a compact timeline stays in the run summary and in the run log. After a successful backup the runner applies retention and starts follow-up jobs.

Catalog

The catalog is a SQLite file (catalog.db) in write-ahead-log mode. At startup the database migrations are applied; updating the server therefore migrates the database by itself.

Contents: agents and certificates, repositories, jobs, schedules, runs and run logs, snapshot index and snapshot registry, users, roles, tokens, audit log, notification rules, plans, blackout windows, quotas, statistics, isolation tables and further settings. Secrets in it (S3 keys, database passwords, repository passwords) are encrypted with XChaCha20-Poly1305 under a master key.

The snapshot index in the catalog is a cache: it can be rebuilt from the repositories at any time. The snapshot registry, by contrast, holds only snapshots the server registered itself as results of its runs; retention, restore and copies work with registered snapshots only. Everything else counts as foreign and raises the foreign_snapshot notification.

The master key is in secret.key in the data directory. On Windows it is bound to the machine with DPAPI, on Linux it is a file with mode 0600. The keys of the certificate authorities in the pki folder are additionally encrypted with it.

Web interface and REST API

The web interface is built into the program. After an update the browser loads the new version automatically, so there is no stale interface. Sign-in, roles and security headers are described in chapter 11 Users and Security, the API in section 2.6 REST API.

Internal CA

On first start the server creates its own certificate authority and issues its certificate and all agent certificates from it. The server certificate is valid for server_cert_days (default 90), agent certificates for agent_cert_days (default 30); both are renewed at two thirds of their lifetime. Details in section 2.3 Agent communication and PKI. Under Settings โ†’ Certificate you can add more names or upload your own certificate for the web interface.

Configuration backup

Daily (and on demand) the server writes a snapshot of its own state (catalog, pki, server.toml and the master key wrapped with the DR passphrase) into every repository that is marked as a target for configuration backups. Such repositories can be used by the server only; agents get no access. Restoring is described in chapter 09 Restore and the operating procedure in chapter 14 Operations and FAQ.

Running as a service


Windows

Linux

Service name

PDCBackupServer (automatic start)

pdc-server.service (systemd, Type=simple)

Account

LocalSystem; data folder only for SYSTEM and administrators

System user pdc-backup, no capabilities, no privileges

Data folder

C:\ProgramData\PDC-Backup\server

/var/lib/pdc-backup (mode 0700)

Setup

Setup, or pdc-server.exe service install

.deb or .rpm package

Tray icon

PDC-Backup-Tray.exe: only shows whether the service runs

not available

Power

Keeps Windows awake during runs; optional wake timer for the next job

not applicable

The server's systemd unit is hardened: NoNewPrivileges, an empty capability set, ProtectSystem=strict with write access only to the data directory and the usual repository places (/srv, /mnt, /media), PrivateTmp, PrivateDevices, RestrictAddressFamilies and UMask=0077. If a repository lives elsewhere, add it with systemctl edit pdc-server.

pdc-server commands

Command

Purpose

run

Start in the foreground (console)

info

Show the CA fingerprint and certificate names

service install, service uninstall

Register or remove the Windows service (data stays)

dr restore

Restore the server from a configuration backup

server-key prepare, rotate, show

Rotate the server's TLS key and show the pins agents accept

four-eyes disable, status

Turn four-eyes approval off or show its state on the server host

smb-mount-unit

Linux, as root: write systemd mount units for an SMB share

On Linux run these commands as sudo -u pdc-backup pdc-server --data-dir /var/lib/pdc-backup โ€ฆ, otherwise a catalog.db with the wrong owner is created.

Logs and metrics

The log is written as JSON lines to the logs folder of the data directory, rotated daily, kept for 30 days. The environment variable PDC_LOG sets the level (for example PDC_LOG=debug). /metrics serves Prometheus text for Prometheus and the Zabbix HTTP agent; new installations require a bearer token (chapter 10 Monitoring and Reports).

Last updated Nov 16, 2026