13.3 pdc-recovery.toml
The restore console of the recovery medium (pdc-agent recovery) asks for the network, source, snapshot and target disk on screen. A pdc-recovery.toml file can preset these answers, up to a restore without any questions. This page describes every key. The medium itself and the restore procedure are in chapter 09 Restore.
Where the console looks for the file
Without --config, the console takes the first file it finds.
Medium | Search order |
|---|---|
Linux medium | 1. Path from |
WinPE medium | 1. |
Examples of the file are at the end of this page. On a WinPE medium, it is enough to place the file as pdc-recovery.toml in the root of the USB stick.
Rules
All keys are optional. The console asks for whatever is missing. In unattended mode (
pdc-agent recovery --non-interactive) a missing value is an error.Unknown keys are an error. An unknown key in any section makes the file invalid ("invalid β¦").
Source: Either
[server](a PDC-Backup server) or[repository](open a repository directly), as in the examples below.Secrets:
[server] token,smb_password,secret_access_keyandpasswordare stored in plain text in the file. Protect the medium accordingly. The recovery token is single use; the agent enrolled with it may restore the image backups of all machines and works only forrecovery_agent_hourshours (default 24, see section 13.1 server.toml).
Top level
These keys come before all sections.
| Name | Required | Default | Description |
|---|---|---|---|
confirm | false | Skips the final confirmation (typing "YES") before writing to the disk. For unattended restores only. | |
reboot | (not set: ask) | Reboot after a successful restore. true: reboot, false: do not, not set: the console asks. |
| Name | Required | Default | Description |
|---|---|---|---|
mode | dhcp | dhcp: address by DHCP. static: fixed address (address, gateway, dns). none: leave the network as it is. | |
interface | (first Ethernet interface with a link) | Name of the network interface. | |
address | Fixed address with prefix length (only with mode = static). | ||
gateway | Default gateway (only with mode = static). | ||
dns | [] | List of DNS servers. |
| Name | Required | Default | Description |
|---|---|---|---|
url | Agent endpoint of the server. | ||
token | β’β’β’ | Enrollment token of kind "recovery" from the web interface (single use). |
| Name | Required | Default | Description |
|---|---|---|---|
kind | local | Type of storage: local (folder on a disk), smb (network share) or s3. | |
path | local: the repository folder. smb: the folder inside the share. | ||
share | smb: the share. | ||
username | smb: user. | ||
smb_password | β’β’β’ | smb: the user's password. | |
endpoint | s3: endpoint URL. | ||
bucket | s3: bucket. | ||
prefix | "" | s3: prefix inside the bucket. | |
region | s3: region. | ||
access_key_id | s3: access key ID. | ||
secret_access_key | β’β’β’ | s3: secret access key. | |
virtual_host_style | false | s3: virtual-host-style addressing (bucket in the host name) instead of path style. | |
password | β’β’β’ | Passphrase of the repository. |
| Name | Required | Default | Description |
|---|---|---|---|
snapshot | latest (newest image snapshot) or a snapshot ID or ID prefix. | ||
hostname | Consider only images of this host (for latest and for the list). | ||
disk | Disk key in the snapshot. | ||
target | Target device or path of an image file. | ||
grow_last_partition | (not set: ask) | Grow the last partition to the full size of the target device. | |
target_size_bytes | Size in bytes; only for targets that are an image file. |
| Name | Required | Default | Description |
|---|---|---|---|
drivers | [] | Driver folders (searched recursively); relative paths are taken from the medium. If nothing is set and a pdc-drivers folder exists next to the configuration, it is used. The drivers are injected into the restored Windows with DISM. | |
force_unsigned | false | Accept unsigned drivers (DISM /ForceUnsigned). Windows with Secure Boot still refuses to load unsigned boot drivers. | |
enable_inbox_storage | true | Sets the inbox storage drivers (storahci, stornvme, iaStorV, storvsc, vioscsi, viostor) to start at boot, so a system started on other hardware finds its disk. | |
repair_boot | true | Recreates the boot files with bcdboot. | |
firmware | auto | Firmware the boot files are written for: auto (UEFI for GPT with an EFI system partition, BIOS for MBR), uefi, bios or all (both). | |
skip | false | Skips drivers and boot repair; restore only. |
Examples
Unattended restore of the newest image from a server, with a fixed address:
confirm = true
reboot = true
[network]
mode = "static"
address = "192.168.1.50/24"
gateway = "192.168.1.1"
dns = ["192.168.1.1"]
[server]
url = "https://backup-pc:8444"
token = "pdc1...."
[restore]
snapshot = "latest"
hostname = "office-pc"
disk = "disk0"
target = "/dev/sda"
grow_last_partition = true
Directly from an S3 repository, with questions for everything else:
[network]
mode = "dhcp"
[repository]
kind = "s3"
endpoint = "https://s3.example.net"
bucket = "pdc"
access_key_id = "..."
secret_access_key = "..."
password = "repository passphrase"
Call without questions:
pdc-agent recovery --config /path/pdc-recovery.toml --non-interactive
The options of the recovery subcommand are in section 13.5 Command line.