14.2 Logs and diagnostics
When something does not work, these help in this order: the run log in the web interface, the service status, the log files of server and agent, and the audit log. This page shows where they are and how to increase the verbosity.
Which logs exist
Source | Content | Where |
|---|---|---|
Run log | Course of a single backup, restore, maintenance, and so on, with phases, counters, and messages | Web interface: Runs, click the run (also while it is running) |
Server log | Events of the server (start, certificates, scheduler, errors) | File in the data folder and the service journal |
Agent log | Events of the agent on the machine being backed up | File in the agent's state folder |
Audit log | Every change and sign-in with time, user, action, target, and IP address; administrators only, searchable | Web interface: Audit log |
Run logs and phases
Clicking a run under Runs opens its log. A running run shows what it is doing: opening the repository, loading the repository index, finding the parent backup, shadow copy or snapshot, scanning (the agent counts files and size of the source and compares them with the last backup; nothing is uploaded yet), backing up, saving, finishing. Each phase shows start time, duration, and counters (files, size, current path, MB/s). If the agent waits for the server, the log says so ("Waiting for the server: repository index Β· 3 min"), as well as work on the server itself. After 2 minutes without progress the run says what it waits for. After the run the summary shows a timeline with the duration of each phase. Queued runs give the reason, for example that the repository is busy with another run.
The server deletes run logs after run_log_days days (default 90). A run whose agent stays offline longer than offline_run_timeout_minutes (default 15) is marked failed.
Log files of server and agent
Server and agent write log lines as JSON (one line per event) into a file that starts anew every day. The last 30 files are kept. The file name begins with server or agent, carries the date, and ends in .log.
Component | Windows | Linux |
|---|---|---|
Server |
|
|
Agent |
|
|
The path follows the server's data folder (--data-dir) or the agent's state folder, each with the subfolder logs. Other file prefixes in this folder are update-helper (agent self-update) and recovery (agent in recovery mode). A program started in the foreground on the console (pdc-server run) writes compact, readable lines to the console.
Log level
The environment variable PDC_LOG controls the verbosity (values warn, info, debug, trace). Without the variable info applies. The variable takes effect when the program starts.
# Foreground on Windows (elevated PowerShell)
$env:PDC_LOG = 'debug'
.\pdc-server.exe run
# Linux service: with systemd the usual way is a drop-in, then restart
sudo systemctl edit pdc-server
# [Service]
# Environment=PDC_LOG=debug
sudo systemctl restart pdc-server
For the Windows services PDCBackupServer and PDCBackupAgent, the usual way is to set the variable as a system environment variable and restart the service. After troubleshooting, set it back to info, because debug makes the log files considerably larger.
Checking the service status
Windows
Check the services and test reachability of the agent port (PowerShell):
Get-Service PDCBackupServer # on the server
Get-Service PDCBackupAgent # on an agent PC
Start-Service PDCBackupServer
# from the agent PC: is port 8444 of the server reachable?
Test-NetConnection <server> -Port 8444
# CA fingerprint and certificate names of the server
& "C:\Program Files\PDC-Backup\pdc-server.exe" --data-dir "C:\ProgramData\PDC-Backup\server" info
The notification-area icon of the server PC (setup component "Tray icon") shows in color that the service runs and in grey that it does not; the tooltip gives state and version.
Linux
Check the services, read the journal, and test reachability:
systemctl status pdc-server # on the server
systemctl status pdc-agent # on an agent machine
journalctl -u pdc-server -e
# from the agent machine: is port 8444 of the server reachable?
curl -vk https://<server>:8444
# CA fingerprint and certificate names of the server
sudo -u pdc-backup pdc-server --data-dir /var/lib/pdc-backup info
Server commands by hand run as the user pdc-backup, so that a catalog.db created by root does not prevent the start.
Audit log
Under Audit log (administrators only) every change and sign-in is listed with time, user, action, target, and IP address. The list is searchable. It helps with questions such as "Who changed the job?" or "When was the recovery kit downloaded?". Examples of action names are blackout.created, blackout.updated, and blackout.deleted for blackout windows. Self-service actions on the machines also end up in the audit log. More in chapter 11 Users and Security.
More diagnostic aids
Aid | Use |
|---|---|
Agents | Shows whether an agent is online, with protection status and backups; the agent details show the version. |
Deployment β Agent versions | Shows outdated agents. Agents report new features as a capability; if it is missing, the interface does not offer the feature and points out that the agent needs an update. |
Notifications | Events such as |
| Prometheus or Zabbix interface with gauges for jobs, runs, repositories (size, free space, forecast "full"), and protection status. New installations require a bearer token (Settings β Metrics access). |
Agent commands on the machine | Local users can see the state with |
When an error occurs, this order pays off: read the run log, then check whether the agent is online, then the agent's log file around the time in question, then the server's. Typical messages and their solutions are in section 14.3 Troubleshooting.