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 directory (catalog, PKI, logs, packages, |
| Starts the server in the foreground (console). Reads or creates |
| 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. |
| Restores the server (catalog, CA, settings, secrets) from a configuration backup into a data directory (see chapter 09 Restore). Parameters: see below. |
| Creates the next server key that agents pin. The server announces it to agents at their next connection. Restart the server afterwards. |
| Switches to the prepared key once all agents have connected since |
| Shows the key pins that agents accept now. |
| Shows whether four-eyes authorization is on, and the number of enabled admin accounts. Needs read and write access to the data directory (catalog |
| 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 |
| 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. |
| Registers the service (automatic start) and restricts the data directory to SYSTEM and Administrators. |
| Removes the service. The data stays. |
Parameters of dr restore
Parameter | Effect | Default |
|---|---|---|
| Location of the repository with the configuration backup: a path (local disk, mounted share, UNC path) or | β |
| File whose first line holds the repository passphrase. | β |
| File whose first line holds the DR passphrase. Without it, the command asks on the terminal once a snapshot is chosen. | β |
| Snapshot ID of the configuration backup (from the DR recovery kit or | β |
| Replaces an existing catalog in the data directory. | off |
| Accepts a configuration backup made before the security hardening (master key wrapped with the repository passphrase). | off |
| 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 |
| Access key ID for S3 repositories. | β |
| Secret access key for S3. | β |
| 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 |
|---|---|---|
| The SMB share. | β |
| Mount point, for example | β |
| User on the NAS. | β |
| Domain of the user. | β |
| File whose first line holds the password. Without it, the command asks on the terminal (no echo). | β |
| Name of the credentials file ( | derived from the mount point |
| SMB version ( | β |
| SMB3 encryption. | off |
| Account that owns the files on the share. |
|
| Writes the files below this directory instead of | β |
| 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 directory of the agent. Default: Windows |
| Enrolls this machine with the server using a one-time token. |
| Installs the program file as the agent service, enrolls it and starts it. Run as administrator. The token can also come from |
| Runs in the foreground (used by systemd, also for debugging). |
| Shows the state of the running agent and its backup jobs (asks the service; otherwise the last saved state). |
| Lists the snapshots of this machine that the calling user may restore from (self-service, see chapter 09 Restore). |
| Lists a folder inside a snapshot; only entries the user may read. Default path |
| Restores files from a snapshot of this machine with the user's identity. |
| Starts a backup job of this machine now. |
| Restore console of the medium (network, server or repository, image snapshot, target disk, restore, reboot). |
| 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 |
|---|---|
| Starts the helper and serves the Unix socket. |
| Registers a repository root with the helper (as root). The token comes from the web interface; |
| Prints the helper's limits and the counters per root as JSON. |
| Sends a raw JSON request to the socket and prints the reply (for troubleshooting). |
Parameter | Effect | Default |
|---|---|---|
| Configuration file of the helper (it must be owned by root, and the server cannot change any of it). |
|
| Unix socket of the helper. | Value from the configuration, otherwise |
| Repository root (required for | β |
| Pairing token, exactly one of the two. | β |
| 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.