Back to Blog
Strapi CMS

Protecting Strapi Media Files and Backups in Production

Protect the Strapi database and uploaded media with separate backups, retention, restore order, and tested recovery steps.

Terry Hunt
August 23, 2026
6 min read

A Strapi database backup does not contain uploaded files when the media provider stores them on disk or in object storage. I inventory both systems and write one recovery plan that reconnects database media records with the file objects they reference.

The Strapi Media Library documentation describes the Media Library interface. Production durability depends on the configured upload provider, storage policy, and backup process outside that interface.

Find where every upload lives

I identify the active upload provider, bucket or filesystem path, region, public URL pattern, and credentials used by Strapi. Local container storage may disappear during redeployment, so I do not assume a mounted path is persistent.

I sample media records and confirm the referenced object exists. Orphaned database rows and unreferenced objects require different cleanup decisions.

Back up data and media separately

The database backup covers content records, relations, users, settings, and media metadata. The media backup covers uploaded objects and versions. I schedule both and record whether they share a recovery point.

If the backups run at different times, the restore may contain references to files that were not captured. I define the acceptable gap and use versioning or snapshots where the provider supports them.

Protect backup credentials

Backup jobs use a dedicated identity with read access to the source and write access to the backup destination. Restore access is more restricted because it can overwrite data. Credentials stay in the platform secret store and rotate on a schedule.

I encrypt backups and limit retention according to the data involved. Keeping every backup forever increases cost and privacy exposure.

Document restore order

I restore infrastructure configuration, database, media objects, and application version in a known order. Domain and CDN configuration may also need restoration if media URLs depend on them. The runbook names the owner for each system.

I verify object permissions after restore. Files can exist while public pages return 403 because the bucket policy, signed URL configuration, or CDN origin changed.

Run a real restore test

I restore into an isolated environment, start the matching Strapi version, and sample text, relations, users, and media. I request original and transformed media URLs and inspect logs for missing objects.

A successful backup job proves that files were written. Only a restore test proves the team can recover them within the expected time.

Monitor drift and failed jobs

I alert on backup failures, old recovery points, unusual size changes, and restore-test failures. I also track provider changes because moving from local uploads to object storage changes the recovery procedure.

  • Database and media locations are inventoried.
  • Both receive backups.
  • Credentials are scoped and rotated.
  • Restore order is documented.
  • An isolated restore test passes.

Need help with Strapi?

Terry Hunt Dev supports Strapi hosting, storage, and recovery through Strapi development and website maintenance. Request a backup review through the contact page without sharing credentials.

Related Articles

More articles in Strapi CMS

Enjoyed This Article?

Get more tutorials and insights delivered to your inbox. No spam, just valuable content for web developers.