5.6 Tray app and self-service
The tray app shows users of a Windows machine the backup state in the notification area. With self-service, local users can also start backups and restore their own files without access to the web interface. The administrator turns both on per agent and per plan.
Tray app
The tray app PDC-Backup-Agent-Tray.exe exists for Windows only. The agent setup installs it with the Tray icon component (on by default; /NOTRAY leaves it out) and starts it at every logon. Each logged-on user gets their own icon. The app talks only to the local agent service over the local interface, never directly to the server.
The icon polls the state every 10 seconds, every 2 seconds while a backup runs. Its color follows the protection status of the worst enabled job on this machine:
Color | Meaning |
|---|---|
Green | All enabled jobs are fine. |
Yellow | At least one job has a warning. |
Red | A job last failed. |
Grey | No status: server unreachable, no backup yet, or no job for this PC. |
The tooltip shows the state and the last backup. While a backup runs, it shows the job and the progress in percent.
Right-click the icon to open the menu:
Entry | Effect |
|---|---|
Header lines | Machine name, a message about the connection or protection status, then one line per job with its last and next run. Not clickable. |
Back up now | Submenu with the jobs of this machine. Starts the chosen job immediately. Visible only if the administrator turned on Users may start backups (see below). |
Open web interface | Opens the web interface in the browser. |
Notify when a backup fails | Turns the failure notification on or off. Default: on. |
Hide icon | Hides the icon until the next logon. |
When a job newly fails, Windows 10 and 11 show a notification ("The backup ... failed. Open the web interface for details."). A job the app sees for the first time triggers no notification. The Notify when a backup fails setting is stored per user in %LOCALAPPDATA%\PDC-Backup\agent-tray.json.
Commands on the machine
All commands belong to the pdc-agent program, which exists on Windows and Linux. They talk to the running agent service over the local interface. The tray app offers only status and Back up now; browsing snapshots and restoring work only with these commands.
Command | Effect |
|---|---|
| Shows agent ID, server, connection, protection status, the self-service switches, and the jobs with their last and next run. If the service is unreachable, it shows the last saved state. |
| Lists the snapshots of this machine offered for self-service. |
| Lists a folder in the snapshot. The path defaults to |
| Restores files. The default target is a new folder |
| Starts a job of this machine immediately. |
An example:
pdc-agent snapshots
pdc-agent browse a1b2c3d4 /Users/anna/Documents
pdc-agent restore a1b2c3d4 /Users/anna/Documents/Offer.docx --target D:\Recovered
How a restore works
The user asks over the local interface. The agent keeps the request (who, which snapshot, which paths, which target) in memory under a random nonce.
The agent asks the server for the restore. The server checks the switches and the machine assignment and queues a restore run that carries only the nonce.
When the run starts, the agent matches it to the local request. A run without a matching request fails: the agent never restores on the server's word alone.
The agent checks every entry against the user's stored permissions and writes only readable data, with the user's identity.
The user sees the result: the number of restored files and folders, entries left out because the user may not read them, and existing files that were kept.
Each user can have at most one waiting or running restore. Results stay retrievable for only a short time.
Security rules
Readable files only. The agent evaluates the permissions saved with the backup: owner, group, other, and POSIX ACL on Linux; the stored security descriptor on Windows. Every folder on the way must be searchable. The agent checks folders above the backup sources on the live system. Special files and alternate data streams are never offered.
Writing with the user's identity. On Linux a dedicated thread switches its file system identity and drops all privileges; on Windows it takes over the user's token. New files belong to the user.
Private and never overwriting. New folders get mode 0700, files at most the owner permissions of the originals. Existing files are kept unless
--overwriteis set; then the agent replaces them atomically. Links, devices, and pipes at the target are never opened.Local users only. On Windows the pipe admits only interactive logons and rejects network logons. On Linux the agent identifies the user by the kernel's peer credentials. Each user gets at most 4 connections, 64 in total. The administrator (SYSTEM, root) is never locked out by this.
Fixed command set. Only status, start backup, snapshots, browse, restore, and progress exist. Requests are size-limited and unknown fields are rejected.
Audit. Every action is in the audit log (see chapter 11 Users and Security).
Turning on self-service
Self-service is off by default. It needs two switches, one on the agent and one on the plan:
Option | Effect | Default |
|---|---|---|
Agent, Users restore their own files | Local users may view snapshots of this machine and restore their own files. | Off |
Agent, Users may start backups | Back up now in the tray app and | Off |
Plan, Offer for local restore | Snapshots of the jobs on this plan appear on machines with self-service turned on. | Off |
The agent switches are in the agent settings (section 5.4 Agent settings), the plan switch in the protection plan (chapter 07 Schedules and Plans).