Encrypted backups

For developersVersion 1.0.0Last updated:

Encrypted backups. New backups are stored encrypted, with the .bosz extension. The key doesn’t travel in the backup or in its database: it lives in the site’s keyring (builder_os_backup_keys, encrypted with Builder_OS_Backup_Vault). On the same site they open on their own.

  • Recovery key (BOSK1-…, with a checksum). It’s shown with the administrator’s password in Backups → Encryption and access, it can be downloaded, and the panel keeps insisting until you confirm it’s saved. It’s needed to restore on another site or if the wp-config.php keys change. Without it, those backups can’t be opened: not even support can.
  • Another site. A backup from another site appears as «Needs its key»; when you restore it, the dialog asks for it and it’s stored in the keyring. You can also add it beforehand, from the card.
  • Site-to-site migration. It asks for nothing: during sending the backup carries a slot that opens the migration key’s secret, and the destination swaps it for its own on receipt. An old destination is detected at the start and the send stops, asking you to update it.
  • Remote destinations. They receive the .bosz: the provider can’t see the content. The sha256 fingerprint stays the same.
  • Old backups. .zip ones can still be restored, with a notice. The card offers Encrypt them (each is encrypted, verified by decrypting it, and only then is the original removed) or Delete them; nothing without confirmation. Those you already uploaded to remote destinations aren’t touched.
  • Without sodium or OpenSSL. The backup is made unencrypted (.zip), the result says so and the card warns you. An unencrypted backup is better than none; what isn’t done is keeping quiet about it.

What a backup contains. Never: the license and its token (builder_os_license*), SMTP password, Turnstile secret, form integration accounts, destination credentials, CRM credentials and tokens, 2FA secrets, application passwords (MCP keys), sessions, signed-link keys and salts stored in the database. When restoring on the same site, the current ones stay (by username in the case of 2FA and application keys). On another site you must enter them again and links already sent (cancel appointment, reviews, tracking) stop working.

Secrets classified in 4.18. Each module declares in its manifest which options hold secrets, and since 4.18.0 these also don’t travel in a backup: the AI key (builder_os_ai, field api_key) and the DeepL one (builder_os_translate_settings, field deepl_key), which come out empty; the secrets of attribution destinations (builder_os_attribution_destinations: api_secret, access_token, secret, client_secret and refresh_token, already sealed with the backup key and emptied as defense in depth; feed_hash and sale_key_hash do travel, because they’re hashes of random keys and without them the feed and the sales key would stop working after migrating); and the CRM push notification key pair (builder_os_crm_push), which is kept whole because restoring an old public key alongside the current private one would break all subscriptions. When restoring on the same site, the current values are kept. Backups made before 4.18.0 may contain the AI and DeepL keys: delete the ones you don’t need; BuilderOS doesn’t delete them by itself.

It does include, encrypted: users with their password hash (without it nobody could log in after restoring) and other plugins’ settings, which may hold their own secrets. The webhook headers of a form’s integrations remain inside its settings, encrypted with that site’s key.

Can it be downloaded by URL? Apache honors the folder’s .htaccess; Nginx and Caddy don’t. BuilderOS tests it for real: it leaves test files .zip, .bosz, .json and .sql and its listing, requests them over HTTP (6 s, no cache, not following to another host) and deletes them. It repeats every week, only when opening Backups or when a backup finishes, and with the «Check now» button. If the folder is exposed, the card gives the Nginx and Caddy rules with that site’s path, and the dashboard shows a general notice. Cost on the public site: none.

It requires free space for one more backup while encrypting or decrypting; if there isn’t any, it fails with the reason, without touching anything.

4096-byte header: BOSENC1\n, length and JSON { v, alg, chunk, salt, slots, created, mode, bos } (nothing the file name doesn’t already say). Then, records of longitud + cifrado autenticado: record 0 is the manifest and the following ones are the ZIP in 1 MB slices. AES-256-GCM (a256gcm) or XChaCha20-Poly1305 (xc20p). Nonce = index + last-record flag (STREAM): truncating, reordering or appending is detected. Random file key, wrapped in slots by master key. With no file key in the job state: it’s taken from the header on each slice.

Filters: builder_os_backup_encrypt, builder_os_backup_cipher_alg, builder_os_backup_secret_options, builder_os_backup_secret_fields, builder_os_backup_secret_usermeta.

An extension with its own secrets must declare them in these filters and in builder_os_backup_preserved_options.