VPS Snaps

Encrypted backups and your recovery key

How backups are encrypted before upload, what that protects against and what it does not, and how to decrypt one yourself with your recovery key.

4 min readStorage

Each backup file is encrypted before it leaves the machine that makes it: your server, your agent, your WordPress site, or a container in your own platform account. DNS zones, Shopify stores and Kubernetes manifests have no machine of yours to run on, so our worker encrypts them before upload. The cipher is AES-256 in CTR mode, and the file is in OpenSSL's standard format, so you can decrypt it with openssl alone. An encrypted backup's name ends in .enc.

Your workspace's key

Each workspace has its own backup key. VPS Snaps keeps it, encrypted, so restores, test restores, Verify now and failover keep working without you doing anything. Each file is encrypted with its own key derived from the workspace key, and only that one file's key is ever sent to a machine. Before any restore decrypts a backup, it checks the stored file's size and MD5 against what VPS Snaps recorded when it was written.

What it protects against, and what it doesn't

  • It protects against someone getting into your bucket or Drive: a leaked storage key, a bucket left public, or a compromised storage account. They can't read your backups.
  • It does not protect against VPS Snaps itself being compromised. VPS Snaps holds the key so that restores keep working, so it can decrypt your backups.

Download your recovery key

Go to Settings → Workspace, find Backup encryption key, and choose Download recovery key. You confirm with a two-factor code (or your password, if two-factor isn't on). Owners and admins can download it. It saves as vpssnaps-recovery.key. Keep it somewhere other than VPS Snaps, such as a password manager: with it, you can decrypt any of this workspace's backups without VPS Snaps.

Deleting your account deletes the key with it. Download the recovery key first, or your encrypted backups can't be decrypted afterwards.

Decrypt a backup yourself

Download the backup (from its page, or straight from your storage), put vpssnaps-recovery.key in the same folder, and run this, with the backup's file name in place of BACKUP.enc. You need OpenSSL 1.1.1 or later, which any current Linux or macOS has.

openssl enc -d -aes-256-ctr -pbkdf2 -iter 100000 -pass file:vpssnaps-recovery.key -in BACKUP.enc -out BACKUP

The result is the backup as it was made, for example a .sql.gz or .tar.gz, and restores with the usual commands.

Turning it on

Encryption is on by default for new jobs, on every plan. A job made before that keeps storing backups unencrypted, and its page says so. Turn it on with Encrypt this job's backups on the job's page, or for every such job at once with Encrypt all on the Storage page. It applies from the job's next backup; backups already stored stay as they are, and still restore.

Agent and WordPress jobs

Agent jobs need agent 1.5.0 or later, and WordPress sites need the plugin 1.4.0 or later, to encrypt. An older version keeps backing up unencrypted and says so; update it to encrypt. A server backed up over SSH needs openssl installed, as most Linux servers already have; without it the run fails and says to install the openssl package.

Using the Agent

Still stuck?

Open the failed run under Backup History and copy the error text out of the log — pasting that into your first message is usually the difference between one reply and four.