On this page

13.5 Command line

This page lists all subcommands and parameters of the programs pdc-server, pdc-agent and pdc-immutable-helper. The restore console has no program of its own: it runs as the recovery subcommand of the agent. With --help, every program and subcommand shows its help; --version shows the version.

pdc-server

Call: pdc-server [--data-dir PATH] <subcommand>. The server normally runs as a service (Windows: PDCBackupServer, Linux: pdc-server.service); the subcommands are for setup and maintenance.

Parameter or subcommand

Effect

--data-dir PATH (global, environment variable PDC_DATA_DIR)

Data directory (catalog, PKI, logs, packages, server.toml). Default: Windows C:\ProgramData\PDC-Backup\server, Linux /var/lib/pdc-backup.

run

Starts the server in the foreground (console). Reads or creates server.toml. Stop with Ctrl+C or SIGTERM.

info

Prints the data directory, the CA fingerprint, the names in the server certificate and the address of the web interface. The fingerprint is for comparison when the browser warns about the certificate on the first visit.

dr restore

Restores the server (catalog, CA, settings, secrets) from a configuration backup into a data directory (see chapter 09 Restore). Parameters: see below.

server-key prepare

Creates the next server key that agents pin. The server announces it to agents at their next connection. Restart the server afterwards.

server-key rotate

Switches to the prepared key once all agents have connected since prepare. Stop the server first and start it afterwards.

server-key show

Shows the key pins that agents accept now.

four-eyes status

Shows whether four-eyes authorization is on, and the number of enabled admin accounts. Needs read and write access to the data directory (catalog catalog.db).

four-eyes disable

Turns four-eyes authorization off and cancels open requests, for example when only one admin is left. Takes effect at once, also while the server runs, and is recorded in the audit log as local-cli. Needs write access to the data directory (root or SYSTEM/Administrators).

smb-mount-unit (Linux only)

Sets up an SMB share for a repository as a systemd mount and automount unit owned by the service account. Run as root. Parameters: see below.

service install (Windows only)

Registers the service (automatic start) and restricts the data directory to SYSTEM and Administrators.

service uninstall (Windows only)

Removes the service. The data stays.

Parameters of dr restore

Parameter

Effect

Default

--repo LOCATION (required)

Location of the repository with the configuration backup: a path (local disk, mounted share, UNC path) or s3:<endpoint>/<bucket>[/<prefix>].

–

--password-file FILE (required)

File whose first line holds the repository passphrase.

–

--dr-passphrase-file FILE

File whose first line holds the DR passphrase. Without it, the command asks on the terminal once a snapshot is chosen.

–

--snapshot ID

Snapshot ID of the configuration backup (from the DR recovery kit or GET /api/v1/system/dr). Without it, the command lists the candidates and stops.

–

--force

Replaces an existing catalog in the data directory.

off

--allow-legacy

Accepts a configuration backup made before the security hardening (master key wrapped with the repository passphrase).

off

--allow-root-owner

Unix, as root: accepts a data directory owned by root (only for a server that runs as root). Without it, such a directory is refused because the service account could not open the files.

off

--s3-access-key-id ID (PDC_S3_ACCESS_KEY_ID)

Access key ID for S3 repositories.

–

--s3-secret-access-key SECRET (PDC_S3_SECRET_ACCESS_KEY)

Secret access key for S3.

–

--s3-region REGION (PDC_S3_REGION)

Region for S3.

–

sudo pdc-server --data-dir /var/lib/pdc-backup dr restore \
  --repo /mnt/nas/pdc-config --password-file /root/repo.pass \
  --snapshot <snapshot ID> --dr-passphrase-file /root/dr.pass

Parameters of smb-mount-unit (Linux)

Parameter

Effect

Default

--share //SERVER/SHARE[/FOLDER] (required)

The SMB share.

–

--mount PATH (required)

Mount point, for example /mnt/pdc-nas.

–

--user NAME (required)

User on the NAS.

–

--domain DOMAIN

Domain of the user.

–

--password-file FILE

File whose first line holds the password. Without it, the command asks on the terminal (no echo).

–

--name NAME

Name of the credentials file (/etc/pdc-backup/smb-<name>.cred, mode 0600).

derived from the mount point

--vers VERSION

SMB version (vers= of mount.cifs), for example 3.0 or 3.1.1.

–

--seal

SMB3 encryption.

off

--service-user NAME

Account that owns the files on the share.

pdc-backup

--root DIRECTORY

Writes the files below this directory instead of / and does not run systemctl.

–

--dry-run

Prints the units and options only, changes nothing.

off

The web interface shows the matching command in the repository dialog (see chapter 08 Repositories and Storage).

pdc-agent

Call: pdc-agent [--state-dir PATH] <subcommand>.

Parameter or subcommand

Effect

--state-dir PATH (global, environment variable PDC_AGENT_DIR)

State directory of the agent. Default: Windows C:\ProgramData\PDC-Backup\agent, Linux /var/lib/pdc-agent.

enroll --server URL --token TOKEN [--force]

Enrolls this machine with the server using a one-time token. --server: agent endpoint, for example https://backup-pc:8444. --token (or PDC_ENROLL_TOKEN): token from the web interface. --force replaces an existing enrollment. Prints the agent ID.

install --server URL --token TOKEN (Windows only)

Installs the program file as the agent service, enrolls it and starts it. Run as administrator. The token can also come from PDC_ENROLL_TOKEN.

run

Runs in the foreground (used by systemd, also for debugging).

status [--json]

Shows the state of the running agent and its backup jobs (asks the service; otherwise the last saved state). --json for machine-readable output.

snapshots [--json]

Lists the snapshots of this machine that the calling user may restore from (self-service, see chapter 09 Restore).

browse SNAPSHOT [PATH] [--json]

Lists a folder inside a snapshot; only entries the user may read. Default path /.

restore SNAPSHOT PATH... [--target FOLDER] [--overwrite]

Restores files from a snapshot of this machine with the user's identity. --target: absolute target folder; without it, a new folder "Restored " in the home directory is created. --overwrite replaces existing files in the target. At least one path is required.

backup-now JOB

Starts a backup job of this machine now.

recovery [--config FILE] [--non-interactive]

Restore console of the medium (network, server or repository, image snapshot, target disk, restore, reboot). --config: configuration file (default: pdc.config= on the kernel command line, then pdc-recovery.toml on the boot medium, see section 13.3 pdc-recovery.toml). --non-interactive: no questions, everything comes from the configuration; a missing value is an error.

service install / service uninstall (Windows only)

Registers or removes the agent service.

sudo PDC_ENROLL_TOKEN=<token> /opt/pdc-agent/pdc-agent enroll --server https://backup-pc:8444
pdc-agent status --json
pdc-agent restore <snapshot ID> /home/anna/Documents --target /tmp/restored

pdc-immutable-helper

The helper for hardened repositories runs on Linux only, as root, as its own service on the machine that holds the repository (see chapter 08 Repositories and Storage). The Linux packages include the helper service; it is paired and activated through the repository panel (Set up helper…) or with enroll.

Subcommand

Effect

serve [--config FILE]

Starts the helper and serves the Unix socket.

enroll --root DIRECTORY (--token TOKEN | --token-file FILE|-) [--config FILE] [--no-systemd]

Registers a repository root with the helper (as root). The token comes from the web interface; --token-file - reads it from standard input. The pairing must be completed in the web interface within 60 minutes. Without --no-systemd, the command writes a systemd drop-in file with the repository roots, reloads systemd and restarts the service.

status [--config FILE] [--root DIRECTORY] [--socket PATH]

Prints the helper's limits and the counters per root as JSON.

request --socket PATH JSON

Sends a raw JSON request to the socket and prints the reply (for troubleshooting).

Parameter

Effect

Default

--config FILE

Configuration file of the helper (it must be owned by root, and the server cannot change any of it).

/etc/pdc-immutable-helper/config.toml

--socket PATH

Unix socket of the helper.

Value from the configuration, otherwise /run/pdc-immutable-helper/helper.sock

--root DIRECTORY

Repository root (required for enroll, a filter for status).

–

--token, --token-file

Pairing token, exactly one of the two.

–

--no-systemd

Do not write a drop-in file and do not restart the service.

off

The configuration file knows the keys socket (default /run/pdc-immutable-helper/helper.sock), state_dir (/var/lib/pdc-immutable-helper), server_user (pdc-backup), min_days (7) and max_days (3650); the lock period of every request is clamped into this range of days.

Last updated Nov 16, 2026