When encrypted Strapi exports fit an offsite backup plan
If your self-hosted Strapi team must send backups to another site, a cloud account or a vendor, strapi export with encryption is one of the tools to evaluate for that copy. It packages Strapi content and configuration into an archive that can be encrypted and compressed before it leaves your network. It fits best when you need a portable, Strapi-aware copy of content that you can move offsite, while database dumps and media copies remain the primary path for full recovery. Confirm the exact command, flags and encryption options for your Strapi version in the export documentation before you write any runbook, because these options change between releases and this page does not list them.
Strapi exports are not a complete backup on their own. A Strapi export does not replace a database dump taken from PostgreSQL, MySQL, MariaDB or SQLite, because that dump captures the full database state at a point in time. Media files stored in the upload provider, such as local storage or an object store, also need their own copy and retention rules. Treat the encrypted export as one layer in a backup plan that also covers database dumps, media, secrets, restore testing and retention. Ask your Strapi partner or internal team to document which of these items the export includes and which it leaves out for your database and upload settings.
Before you choose this route, decide where the encryption key will live, who can read it and how it will be restored if the primary site is lost. A key stored only on the same server as the archive defeats the purpose of an offsite copy. Also confirm how your target storage handles object immutability and access logs, since the archive will leave the boundary you control. A short restore drill into a clean environment will show whether the export, the key and your Strapi version work together when you need them.
What a Strapi export archive contains and what it leaves out
A Strapi export bundles several kinds of data, and each one behaves differently on restore. Some parts travel inside the archive, some depend on storage outside Strapi, and some should never be placed in the archive. Check each component against the export documentation for your Strapi version before you assume a restore is complete.
Content entries and relations
These are the entries your editors created, along with the relations that link them to other entries. Most teams expect this part to be in the archive, so it is the easiest to assume is complete. Confirm with the current export documentation whether draft versions, localized entries and release data are included. Restore the archive to a clean test instance and compare entry counts for each content type against the source before you rely on it.
Schema and content type definitions
The content types, components and dynamic zones define the structure of the data. An archive restored into a project whose schema differs from the source can fail or place fields in the wrong location. Keep the Strapi version and the project's schema files in version control next to each archive, so the target can be built from the same state. Confirm how the export handles schema when the target project has already changed.
Configuration and plugin settings
Some settings are stored in the database, such as roles, permissions and locale configuration, while others live in code. Confirm which settings the export captures and which stay in your repository. Custom routes, controllers, policies and configuration files are not data, so they must be restored from source control and your deployment pipeline. A restored archive without its matching code can behave differently from the source.
Media files and upload storage
Images, documents and other uploads are often kept in a storage bucket rather than on the application server. Whether the export includes the files themselves or only references to them depends on the export options and your upload provider. Ask which bucket holds uploads, how versioning or replication protects it, and whether it needs its own backup job with separate retention. A restored entry that points to a missing file looks healthy until an editor opens it.
The database itself
The export is a Strapi-level copy of content, so it does not replace a native database backup. Users, roles, database-level settings and the engine's own recovery state are outside its scope. Keep a native dump or the platform's point-in-time backup as a separate recovery path. Strapi's migration documentation says to back up the database before an upgrade because downgrading is not supported, so the same discipline applies before any major change.
Strapi migration docsEnvironment secrets and the encryption key
Application keys, token salts, JWT secrets and database passwords belong in your secrets manager and stay out of the archive. The key used to encrypt the export is the most critical item here. If it is lost, the encrypted archive cannot be opened, and if it sits beside the archive, anyone who copies the archive can read it. Keep a copy in a location controlled by a separate team, and test that it decrypts a restored archive before you need it.
Encryption, compression and format options and when each fits
This table compares the four settings a team decides before an offsite Strapi export: encryption, compression, archive format and output location. Read each row against your restore path and the tooling your recovery team already has. The main takeaway is that every choice trades restore speed and simplicity against exposure, so confirm each flag in the CLI help for your installed Strapi version before you script it.
| Option | When it fits | Trade-off | What to confirm in your installed version |
|---|---|---|---|
| Encryption on | Archive leaves your network, goes to a third-party bucket, or lands on removable media | Restore needs the key at the moment of recovery, so key loss means lost backups | Whether the export command offers an encryption option, which algorithm it uses and how the key is supplied |
| Encryption off | Archive stays inside a controlled network with encrypted storage at rest and tight access | Anyone who obtains the file can read the content, including personal data | Whether your storage layer already encrypts at rest and whether that covers copies made during transfer |
| Compression on | Offsite transfer is bandwidth-limited or storage is billed by volume | Smaller files, but more CPU time during export and restore and a larger failure surface if the archive is corrupted | Which compression method the CLI applies and whether it can be turned off |
| Compression off | Export runs on a constrained host, or you need fast restores during an outage | Larger archives and longer uploads | Whether the default is compressed so you know what you are changing |
| Archive format | Use the format Strapi writes natively when restores run through Strapi's own import tooling | Restores depend on the Strapi version that can read the format, so pin versions for archives you keep | Which file layout the export produces, which version reads it and whether it bundles media and schema files |
| Output location | Local disk for staging, then a separate copy to offsite storage on a schedule | Local copies add exposure on the host, and a single destination means a single point of failure | Whether the command writes to a path you choose and what it includes by default, such as media or configuration |
| Restore verification | Every archive you keep, restored into a non-production instance on a schedule | Adds an environment and time to each test cycle | Which import command is used, and whether the test restores media and encrypted content end to end |
How to handle encryption keys so an offsite archive stays restorable
The encryption key must be stored apart from the archive it protects. A key kept beside the export file defeats the purpose of encrypting it for offsite storage, because anyone who obtains the backup location also obtains the key. Place the key in a secrets manager or key store that is separate from the backup bucket or storage account, and confirm that the restore team can reach it during an incident, including when the primary identity provider or the production network is unavailable. Write down the exact path to the key, the account or role needed to read it, and the steps to retrieve it, then keep that runbook somewhere other than the system it describes.
Assign named holders for the key and review that list on a schedule. Keep the number of people who can read the key small, but make sure at least two people with restore authority can retrieve it without the involvement of the one engineer who set up the backup job. Define rotation as a planned event: decide how often the key changes, how old keys are retained so that archives made under them stay readable, and how the rotation is recorded. Ask your vendor or internal team to confirm how the encryption option in the strapi export workflow expects a key to be supplied and whether a rotated key can decrypt earlier archives, because that behavior determines how long each key must be kept. If a key is lost, archives encrypted with it cannot be recovered by any means, so treat the key as a backup in its own right, with its own copies and access review.
The Strapi application secrets, such as the values used for admin JWT signing, API token salts, and app keys in the environment configuration, are a separate concern from the archive key. Rotating one does not rotate the other, and losing one does not necessarily affect the other. List them in separate inventories with separate owners, storage locations and rotation records. Then test the key against a real archive: retrieve the key using only the runbook, decrypt an export made from the current environment, restore it into an isolated instance, and confirm that content and relations load. Repeat this test after each key rotation, because a key that works on paper but fails on the day of an incident is the most common reason an encrypted backup cannot be used.
Setting up an encrypted export that leaves your network
This sequence produces an encrypted, compressed Strapi export that can leave your network, with its key held apart from the archive and a checksum record for verification. Each step ends with a check you can repeat before you trust the archive for recovery. Confirm the exact export options in the documentation for your Strapi release before you rely on them.
Confirm the Strapi version and database
The platform engineer running the backup records the exact Strapi 5 version from the project's package.json, the Node.js version in use, and the database engine and server version. Check these against the installation requirements: PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later, or SQLite 3. Strapi 5 does not support MongoDB or other NoSQL databases, and Node.js must be an Active or Maintenance LTS release. Done when a short record lists all four values and each one matches the supported list. If the version is older than your team expects, resolve that before exporting, because an archive is tied to the Strapi version that created it.
Run a test export in staging
Run a plain, unencrypted export against a staging copy of the project, not the production server, so you can see what the command produces before adding protection. Confirm that the export completes, note the archive size and the time it took, and inspect the contents for the content types, entries and media references you expect. Then restore a copy of that archive into a second empty staging instance running the same Strapi version and confirm that entry counts match the source. Done when the restored instance shows the same content as the source. This baseline is what you will compare against once encryption is enabled.
Enable encryption and compression
Turn on the encryption and compression options that your Strapi release documents for the export command, and confirm the exact flags and key input method in those docs rather than copying them from a forum post. Generate the encryption key on a system your security team approves, not on the production host that holds the database, and record its identifier in your backup log. Run the export again on staging. Done when the new archive cannot be read with standard tools such as tar or gzip without the key, and a decryption attempt with the wrong key fails cleanly. Keep the staging test archive so you can reuse the same check later.
Write the archive and key to separate locations
Write the encrypted archive to your offsite object storage or backup target, and store the key in a secrets manager or key management service under a different account or access policy. The people and service identities allowed to read the archive should not also be able to read the key, and the reverse should hold. Check the access policy on each location by listing its principals and confirming that no single identity can reach both. Done when you have a written list of who can read each location and a tested failed read from the archive account against the key store. Losing the key makes the archive unrecoverable, so confirm a second authorized custodian exists.
Transfer the archive over an encrypted channel
Move the archive from the export host to the offsite target over a channel that encrypts traffic in transit, such as TLS to an object storage endpoint or SSH or SFTP to a server you control. Before the first transfer, confirm the endpoint certificate or SSH host key against the value your infrastructure team recorded, so a spoofed host cannot receive the file. Keep the transfer log. Done when the transfer tool reports success, the destination shows the archive with the expected size, and the endpoint identity matches the recorded value. Transfer tooling and settings vary by environment, so confirm them with your own network and security team.
Record checksums and verify the restore
Compute a SHA-256 checksum of the encrypted archive on the export host before transfer, then compute it again on the destination after transfer. Store both values in the backup record, separate from the archive and the key. Finally, restore the archive into a scratch Strapi instance using the key from its custodian, then confirm entry counts and media references match the source export. Done when the two checksums are identical, the restore completes, and the scratch instance shows the expected content. Repeat this restore test on a schedule set by your retention policy, because an archive that has never been restored is not yet proven.
The archive stays encrypted until a restore test opens it
The flow starts at the Strapi instance, where the export step reads the database and media storage inside your network. The export writes an encrypted archive in the same trust boundary, while the key sits in a separate key store. Only the archive crosses to the offsite store. The restore test environment needs both copies, so check who can reach the key, how it is released for a test, and whether a restored archive can be read end to end.
Export, key and offsite copy move across the network trust boundary.
How to verify that an encrypted archive actually restores
What is the first step to verify that a Strapi export archive restores?
Restore the archive into an isolated environment running the same Strapi version and database engine that produced it. An isolated copy keeps test data away from production and lets you see whether the archive is complete on its own, without relying on anything still running on the source system. Before you start, record the Strapi version, the Node.js version, the database type and the archive file name, so the result can be traced later. Confirm the archive decrypts with the key held in your key store, not with a key copied from a working server. Treat a restore that succeeds only because the original database or media folder is still reachable as a failed test.
Which record counts should match after a Strapi restore?
Compare entry counts for each important content type against counts taken from the source at the time the export was created. Counts catch missing tables, partial imports and content types that failed silently. Include draft and published versions where your content model uses them, and include components, relations and singleton types, since these are easy to miss. Keep the counts in a simple table with the content type, source count and restored count. Expect small differences only when content changed between the export and your comparison, and explain any gap before you accept the restore.
How do I check sample records and relations after restoring Strapi?
Pick a short, fixed list of records from each critical content type and compare their fields, status and relations with the source. Choose records that exercise the hard parts: localized entries, dynamic zones, components nested several levels deep, and entries that relate to other types. Open them through the admin panel and through the API, since both paths read the restored data. Record the record identifiers you used so the same check can be repeated in the next test. A count can match while a relation points to the wrong entry, so sample checks are the part that catches that.
How do I confirm that media references still work after a restore?
Check that restored entries point to media files that exist in the storage location your restored environment uses. A Strapi export does not necessarily carry the same media files as your database, so confirm how your backup plan stores uploads and whether the restore test includes them. Request several image and file URLs through the API and open them in a browser. Look for broken links, files that return errors, and files that resolve to the wrong storage location. Confirm the storage configuration in the isolated environment points only to the restore copy, so a test cannot change production media.
Why should I log in with a test admin account after a restore?
Logging in confirms that the restored admin data, roles and permissions work, which a database count cannot show. Create or use a dedicated test administrator in the isolated environment, and sign in through the admin panel with the same method your team uses. If you use admin SSO, confirm the test path against a test identity provider configuration, not the production one. Check that the expected roles see the expected content types and that a restricted role cannot reach areas it should not. Remove the test account and any test tokens when the exercise ends.
How long should a Strapi restore take, and how do I time it?
Time the restore from the moment you start the decryption and import until the application responds correctly to the checks above. The duration depends on the size of the archive, the database engine, the speed of the storage and the decryption step, so measure it on the same class of hardware your recovery plan assumes. Ask your team to record each stage separately, because the decryption and import steps often differ in cost. Use the measured time to set the expected recovery window in your plan, and retest when the data grows or the hardware changes. Do not use a time from a different environment as a promise for your own recovery.
How often should I repeat the restore test, and what should I record when it fails?
Repeat the restore test on a fixed schedule that your recovery objectives justify, and run it again after every Strapi upgrade, plugin change and key rotation, because each can break decryption or the import path. Store each run's date, Strapi version, archive identifier, counts, timing and results in a log that your security or operations owner reviews. When a step fails, record it as a finding with the cause, the affected archive, the fix and the retest result. Treat repeated failures as a signal to review the export procedure, the key handling and the restore runbook, not as a one-off event.
Security risks in offsite Strapi exports and the controls that reduce them
An encrypted export is only as protected as the places it passes through. The cards below follow an archive from the Strapi host to the offsite bucket and back, naming the risk at each step, the control to put in place, and what to confirm in your own environment.
Keys stored beside archives
If the decryption key sits in the same bucket, folder or backup job as the archive, encryption adds little protection, because anyone who can read the archive can usually read the key. Keep keys in a separate secrets store with its own access policy, and give the restore role access to the key without giving the backup role that access. Verify that a person who can list the archive bucket cannot also read the key, and that the key is included in your restore runbook rather than only on the original host.
Unencrypted temporary files
Strapi exports are assembled on disk before they are encrypted, so an unencrypted intermediate file can remain on the build or backup host after a failed or interrupted run. Write intermediate files to a dedicated directory with restrictive permissions, delete them in a cleanup step that runs on failure, and check whether the host's scratch space is wiped or swapped to disk. Confirm this behavior on a staging host with a deliberately failed job before relying on it.
Broad access to the offsite bucket
A backup bucket that many services or staff can read turns every exported archive into a copy of the full content and user data. Grant the export job write-only or narrowly scoped write access to one prefix, enable versioning or object lock if your provider supports it, and limit read access to named restore roles. Ask your storage provider to confirm how deletes and overwrites are authorized for the backup role.
Personal data leaving approved regions
An export contains user accounts, submitted form data and possibly personal data in entries, so copying it to a bucket in another region can breach the data location rules that apply to your organization. Pin the bucket to an approved region, check that replication and provider-side backups stay inside it, and record the location in your data inventory. The controls that govern this depend on your own legal and contractual obligations, so confirm them with your data protection lead.
Secrets in logs and job output
Export commands, CI logs and monitoring pipelines can capture passphrases, connection strings and tokens when a job fails and prints its environment. Pass keys through the secrets mechanism of your runner rather than as command-line arguments, mask them in logs, and keep log retention and access aligned with the sensitivity of the archive. Search a sample of recent job logs for key material to confirm nothing leaks.
Restores that were never tested
An archive that cannot be decrypted or imported is not a backup, and key rotation or a provider change can break the restore path without anyone noticing. Schedule a restore into a separate environment on a fixed cadence, verify content counts and a sample of entries, and record which key version each archive used. Confirm the exact import and export commands and supported versions against the Strapi documentation for your installed release.
Questions teams ask before encrypting Strapi exports offsite
What drives the cost of setting up encrypted Strapi exports?
The biggest cost driver is how many environments and databases the export must cover, and how much key and storage process your organization already has. The work breaks into four parts: confirming how your Strapi version's export command handles encryption and compression, deciding where keys live and who can use them, wiring the job into your scheduler and offsite storage, and writing a restore procedure that someone other than the author can follow. Engineering time pays for each part, whether it comes from your staff or a partner. One-time costs include the design, the first pipeline and the first restore test. Recurring costs include key rotation, job monitoring, storage retention and periodic restore tests. Ask any quote to itemize these parts and to state the Strapi version and database engine it assumes.
How long does a first encrypted export and restore test take?
Duration depends on the data volume, the number of environments, whether uploaded media is in scope, and whether key management already exists. A single production project with a modest database and existing secrets tooling is a much smaller job than several environments that each need separate keys and retention rules. The restore test is often the longest step because it needs a staging host running the same Strapi version and a supported database. Illustrative example: a team with one project may finish the design and pipeline quickly but still need time to restore into a clean environment and check the results. Ask for a timeline in writing that lists each environment, the key process and the restore test as separate milestones.
What must our team provide before a partner starts the work?
Your team should prepare four things before the work starts:
- Database access, including read access for the export and a separate restore target that nobody uses for live traffic.
- A key management decision, naming who creates, stores, rotates and can use the encryption keys.
- An offsite storage target with write and read credentials, plus a written retention policy.
- A staging host that runs the same Strapi version as production on a supported database, such as PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later or SQLite 3, as listed in the Strapi installation requirements.
Also confirm the Node.js version, because Strapi 5 runs only on Active or Maintenance LTS releases. Missing items usually delay the restore test more than the pipeline itself.
Can an internal team set up encrypted Strapi exports on its own?
Yes, if the team already runs Strapi in production, has backup operations experience and can own the key lifecycle. The usual gaps are not technical. Teams often leave the export script with one engineer, store keys in the same place as the archives, or skip the restore test after the first success. An internal team can avoid these gaps by writing down the key custody model, assigning a second person to every restore step and scheduling restore tests as recurring work. If any of these pieces is missing, a fixed-scope engagement can build and document them in your infrastructure, so your staff can run the job afterward.
Which Strapi version and database settings change the export?
The export options and output details can change between Strapi releases, so check the command help and documentation for the exact version you run before you write any script. Strapi publishes minor releases frequently, with v5.58.0 published on October 14, 2026, so pin your version and test each upgrade in staging. The database engine also matters, because your backup method and restore steps depend on whether you run PostgreSQL, MySQL, MariaDB or SQLite. Strapi's migration documentation says to back up the database before upgrading and that downgrading is not supported. Keep an encrypted export from before every upgrade, and record the version next to each archive so you know which Strapi release can restore it.
How do we verify that an encrypted Strapi archive actually restores?
Run a restore into an empty staging environment and check the result against what production contains. Retrieve the key from its separate custody location, decrypt the archive, restore it to a clean database, then start Strapi on the same version. Check record counts for key content types, spot-check relations and components, sign in to the admin panel, and call a sample of published entries through the API. Confirm whether your export includes uploaded files, and if it does not, test that media links still resolve from your media storage. Record the time, the operator, the archive name and any errors, then store that record with the backup. A backup that has never been restored is a hypothesis until this test passes.
When is it worth bringing in a partner for offsite backup encryption?
A partner is worth bringing in when the work spans several environments, holds regulated personal data, needs formal evidence for an assessment, or depends on a person who may leave. DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks, and most engagements are fixed-scope with written deliverables and timelines. DeployOpen can prepare systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies do that work. Ask for the written scope, the list of deliverables and the restore test results before you accept the engagement.
Does encrypting the archive replace access control and restore testing?
No. Encryption protects an archive while it sits offsite, but it protects nothing if the key is stored next to the archive or if many people can read it. Access control decides who can create, copy, download and decrypt exports, and it should be reviewed on the same schedule as other production access. A restore test proves that the archive, the key and the procedure work together. Without that test, a team may discover a missing key or incompatible version during an incident. Treat encryption, key custody, access review and restore testing as one control set, and give each a named owner and a recurring review date.
Who owns retention, rotation and restore tests after launch
Once the first encrypted export has been produced and restored, most of the work is recurring, and it needs named owners before go-live. The initial setup happens once. Retention schedules for offsite archives, key rotation, periodic restore tests, updates to the export procedure after each Strapi upgrade and access reviews happen every cycle for as long as the archives exist. Assign each task to a role in writing, with a backup date and a reviewer, so that a team change does not leave an encrypted archive that nobody can decrypt or delete on schedule.
A reasonable split is as follows (confirm it against your own organization). The platform or infrastructure owner runs the export job, the storage bucket lifecycle rules and the restore test environment. The Strapi application owner decides what the export must contain and signs off each upgrade change to the export command, the Strapi version and the database engine. The security owner sets the rotation interval for the encryption key and the passphrase or key-management secret, approves retention periods against your data policy and reviews who can read archives and keys. The compliance or records owner confirms that retention matches legal and contractual obligations, including when archives containing personal data must be deleted. Keep the export key and the archive custody separate so that no single person can both copy and decrypt the data.
Restore tests are the task most often skipped, so schedule them as a calendar item with a recorded result. Each test should restore a recent archive into an isolated environment, start the matching Strapi version, check content counts and a sample of entries and media references, and record the time taken and any manual steps. A failed test is a finding with an owner and a fix date. Ask any partner or internal team for the test cadence, the evidence they will keep and how they will rehearse a restore after a Strapi upgrade, since the Strapi documentation advises backing up the database before upgrading because downgrading is not supported.

