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 |
Agent endpoint | Second listener (default |
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_upis on (default). Withoutcatch_upthe 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(default03: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 |
|---|---|---|
| 1 | Concurrent jobs on one agent |
| 2 | Concurrent backups and maintenance runs on one repository |
| 1 | Concurrent backups into repositories with server-side encryption (1 to 16) |
| 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 |
|
|
Account | LocalSystem; data folder only for SYSTEM and administrators | System user |
Data folder |
|
|
Setup | Setup, or |
|
Tray icon |
| 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 |
|---|---|
| Start in the foreground (console) |
| Show the CA fingerprint and certificate names |
| Register or remove the Windows service (data stays) |
| Restore the server from a configuration backup |
| Rotate the server's TLS key and show the pins agents accept |
| Turn four-eyes approval off or show its state on the server host |
| 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).