8.9 Server-side encryption (experimental)
Server-side encryption is the third mode of Isolation between machines. The agent then gets neither the repository key nor access to the storage: it streams metadata and only the file contents the server asks for, and the server performs the backup with the repository passphrase. The feature is unfinished and off by default.
The three modes compared
Mode | The agent gets | Machines read each other's data | Cross-machine deduplication | Cost |
|---|---|---|---|---|
Shared | whole index, every pack | yes | at backup time | none |
Per-machine index | its own blobs only | no | by the server's maintenance | The server checks every uploaded pack; machines upload data another machine already stored. |
Server-side encryption | no key, no storage access | no | at backup time | The server chunks, compresses and encrypts all data; experimental, file backups only. |
The third mode has the strongest separation: a compromised agent can only read what the server requests for its own runs. In return the plaintext reaches the server process; the server holds all keys anyway.
How a backup runs
The server sends the agent a normal backup job with a one-time token, but without a repository.
The agent runs the pre-script and snapshot provider (VSS, LVM, ZFS) and then opens a new mutually authenticated TLS connection to the server. The server never connects to agents on its own.
Over this stream the server reads the agent's directory structure. It does the comparison with the previous snapshot (size and modification time) itself and requests only new or changed files. So not everything is transferred.
The server chunks, compresses and encrypts the data and writes it to the repository. If the stream breaks or the run is canceled, a guard stops all writes, so no half snapshot is created.
The server creates the snapshot and reports the result to the agent, which releases its snapshot.
Agents receive a 403 response on the REST endpoint of such a repository.
Enabling
The server rejects creation with error 400 while the switch is missing. It lives in server.toml:
[experimental]
server_encryption = true
Restart the server afterwards. In the repository editor the entry Server-side encryption (not yet) stays disabled; such a repository can therefore only be created through the REST interface with "isolation":"server_encryption" in the create call (POST /repositories, see chapter 12 Automation and Deployment).
Key in | Effect | Default |
|---|---|---|
| Allows creating repositories with server-side encryption. |
|
| Number of backups into such repositories that may run at the same time, 1 to 16. | 1 |
Limits and resources
Supported: file backups (
files) into such repositories.Not supported: restores to agents, restore tests on agents, mounts, instant recovery, images, applications, databases and VMs. The server refuses them with a specific message. File-level functions on the server (browse, ZIP download, check, copy, maintenance) work as with any repository, as do restore tests on the server.
Compute load: chunking, compression and encryption move to the server, roughly one processor core per 100 to 200 MB/s and a few hundred MB of memory per concurrent run. This is the reason for
max_server_encryption_runs.