Backup 1.0 security design: encryption, keys and what stays with you
How SQL DATA LOG Backup protects your backups: AES-256-GCM, a key that never leaves your side, a recovery key, DPAPI-protected secrets, outbound-only connections and no backup files in our cloud.
This post describes the security design the Backup module is built around for its 1.0 release. The build in the repository today is a pre-1.0 preview (0.1.0); the points below are implemented in that code, and we say so where something is still open.
Your backup files stay with you
Backup files are sent only to destinations you choose: a local folder, a network share, FTP/FTPS/SFTP or S3-compatible storage. They are never sent to SQL DATA LOG's cloud. The cloud side is meant to hold metadata only (for example job results), not data.
Encryption: AES-256-GCM in 1 MiB chunks
Every backup is compressed (Zstandard) and then encrypted into an .sdlb file:
- AES-256-GCM, an authenticated mode: a modified file is detected, not just unreadable.
- The file is split into 1 MiB chunks. Each chunk is authenticated together with a digest of the file header, the chunk number and a last-chunk flag. Reordering chunks or cutting the file short is therefore detected.
- Each file gets its own random key, which is wrapped with the server's master key.
The key stays with you; the recovery key
The master key is created on your server at setup and stored protected by Windows DPAPI (LocalMachine). During setup you receive the recovery key once: the same master key written as Base32 text with a check value, so a typing mistake is noticed. You save it away from the server.
- Decryption works on any computer with
sqldatalog decryptand the recovery key, without the agent installed. - We do not keep a copy. If the server and the recovery key are both lost, the backups cannot be opened, by you or by us.
Secrets on the server
SQL passwords, S3 secret keys, FTP/SFTP passwords and key passphrases are stored in a vault protected by DPAPI (LocalMachine). The settings file holds only the name of a secret, never its value. Secrets are masked in logs and error messages, and the code has unit tests for that masking.
Network: outbound only
The agent opens no listening port on your server. It only connects out: to your destinations and, in later versions, to the SQL DATA LOG cloud over HTTPS. The connection to SQL Server uses encryption; for older local installs that only have a self-signed certificate there is an explicit option to trust the server certificate.
What it does not do yet
- The automatic weekly restore test is in development and is not in the current build. Verification today is
BACKUP ... WITH CHECKSUMplusRESTORE VERIFYONLY ... WITH CHECKSUM, and a restore you start by hand. See Getting started. - The installer is not yet code-signed, so Windows may show an unknown publisher.
Questions about the design? Write to us on the support page.