Skip to main content
Encryption is optional, symmetric, and configured per job. snapr applies it after compression. Currently only OpenSSL is supported.

Prerequisites

  • openssl must be installed on the snapr host and available in PATH. snapr shells out to it for encryption.
  • snapr runs openssl enc -<cipher> -salt -pbkdf2 -pass env:.... It forwards the password through an environment variable, never on the command line.

Fields

Example

snapr.yaml
snapr appends .enc to the compressed filename (for example backup.tar.gz.enc). After a successful run, it deletes the plaintext archive from the working directory.
Lose the passphrase, lose the backup. Store it outside snapr — in a password manager or a separate secrets store.

Decrypt an archive by hand

snapr encrypts with -salt -pbkdf2, so your decrypt command must include -pbkdf2 as well.
1

Get the encrypted file

Download the archive from the web UI, the download API, or copy it straight off the storage backend. If the job also uses the splitter, reassemble the parts first.
2

Export the passphrase

Put the passphrase in an environment variable so it never appears in your shell history as a command argument:
3

Decrypt

Use the same cipher the job was configured with. With the default aes-256-cbc:
If you set a non-default cipher in the job config, pass that same value here.
4

Extract

Forgetting -pbkdf2 on decrypt produces a “bad decrypt” error even with the correct passphrase, because OpenSSL then derives the key with a different function than snapr used.