How to Back Up and Restore Your EmDash Site

A complete guide to protecting your EmDash site with native export tools, media backups, and automation.

By Central
EmDash's serverless architecture requires a layered backup approach covering content, media, configuration, and plugins.
Highlights
  • EmDash includes a one-click export tool that creates a portable .emdash archive with all content and schema.
  • Media files must be backed up separately using tools like rclone for Cloudflare R2 storage.
  • Plugins storing data outside the content model require independent backup strategies to avoid data loss.

EmDash is serverless by nature. That changes everything about backups. You can’t SSH into a virtual machine and dump a MySQL file. Your database lives in Cloudflare D1 or a local SQLite file. Your media sits in R2 or local storage. Your plugins run inside isolated V8 sandboxes. A traditional backup workflow won’t work here.

But the good news: EmDash ships with native export and import tools. They handle content, media, and schema. For a full restore, you also need to back up the configuration and any custom code. This guide walks you through each layer.

A database dump alone misses three of those four layers.

What Exactly Needs Backing Up in EmDash

EmDash separates concerns differently than WordPress. A complete backup covers four distinct layers:

  1. Content and structure — posts, pages, custom content types, taxonomy terms, and the content schema itself (field definitions, content type blueprints).
  2. Media files — images, documents, videos stored in R2 (Cloudflare) or local file system for self-hosted instances.
  3. Configuration — site settings, SEO metadata, social links, user roles, API tokens, redirects, widget placements.
  4. Plugin and theme code — any custom plugins or themes you’ve developed or installed, plus their state data (e.g., form submissions stored by a plugin).

A database dump alone misses three of those four layers. That’s the critical difference from WordPress.

The Built-In Export Tool: Your First Line of Defense

EmDash includes a one-click export inside the admin panel. Navigate to Settings → Export. You can download a single .emdashcodecodecodecodecode archive that contains:

  • All content items as structured JSON (portable text format)
  • Content type definitions
  • Media metadata (references to the actual files)
  • Taxonomy and tag associations
  • SEO fields for each item

The export does not include the actual media binaries. It only exports references. Media files must be backed up separately.

Based on reports from early adopters, a typical EmDash site with fewer than 100 pages can be fully exported in under 30 seconds using the built-in tool. For sites with thousands of posts, expect a few minutes.

How to Export

  1. Log into your EmDash admin panel.
  2. Go to Settings → Export.
  3. Click Download Export.
  4. Store the .emdashcodecodecodecodecode file in a secure location. Cloud storage (S3, Google Drive) or encrypted local storage works.

This export is your content safety net. Run it weekly for active sites.

Backing Up Media Files

Media is stored in Cloudflare R2 (if deployed on Cloudflare) or on the local file system (if self-hosted). R2 is S3-compatible, so you can use any S3 backup tool.

For Cloudflare-Deployed Sites

  • Option A: Use rclonecodecodecodecodecode to sync your R2 bucket to another location. R2 charges zero egress, so this costs only storage and operations. A full sync of a 500 MB media library typically costs less than $0.01.
  • Option B: Enable R2 replication to another bucket in a different region. This provides live redundancy.

For Self-Hosted Sites

Media lives in a local directory (default: ./mediacodecodecodecodecode). Back it up with rsynccodecodecodecodecode or your standard file backup tool.

“`bash

rsync -avz /path/to/emdash/media/ backup-server:/backups/emdash-media/

“`

Run this daily if your site accepts user uploads.

Backing Up Configuration and Code

Configuration is split between the database and the emdash.config.tscodecodecodecodecode file (or emdash.config.jscodecodecodecodecode). The config file defines database connection, storage provider, and general site behavior. This file is part of your source code — it should already be in version control.

User-facing settings (site title, tagline, social links, SEO defaults) live in the database. The built-in export captures them. But some settings are not exported: API tokens, SMTP credentials, and passkey authentication data. These must be backed up manually.

Recommendation: Keep a secure vault (e.g., 1Password, Bitwarden) with your API tokens, SMTP credentials, and Cloudflare account details. Without these, a restore from export will leave you unable to send emails or authenticate.

Plugin and Theme Code

Custom plugins and themes are code. They belong in a Git repository. The sandbox environment for plugins (dynamic workers) means plugin state is ephemeral — it lives only while the worker runs. Persistent data (e.g., form submissions) should be stored in the database and will be included in the export.

If you installed a plugin from the marketplace (once it exists), note that the plugin code itself is not part of your site’s export. You’ll need to reinstall it after a restore. Document which plugins and versions you use.

Restoring Your EmDash Site

Restoration depends on whether you’re restoring to the same deployment (Cloudflare or self-hosted) or migrating to a different environment.

Full Restore on the Same Infrastructure

  1. Deploy a fresh EmDash instance using the same configuration (same database type, same storage provider).
  2. Import the .emdashcodecodecodecodecode file via Settings → Import. This recreates all content, content types, and metadata.
  3. Restore media files: If on Cloudflare, re-upload media to R2 using rclonecodecodecodecodecode or the R2 web interface. If self-hosted, copy the media directory back.
  4. Reinstall plugins and themes from your Git repository or marketplace.
  5. Reconfigure API tokens, SMTP, and passkeys from your secure vault.

The import tool maps content types automatically. If you created custom content types after the export, the import skips conflicts and logs warnings.

Restoring to a Different Environment (e.g., Local to Cloudflare)

EmDash is designed to be portable. The content export is database-agnostic (JSON). Media can be migrated using S3-compatible tools.

  1. Export from the source site.
  2. Set up a new EmDash instance on the target platform.
  3. Import the .emdashcodecodecodecodecode file.
  4. Copy media files: from local to R2, or from one R2 bucket to another.
  5. Update the emdash.config.tscodecodecodecodecode to point to the new database and storage.

One caveat: sandboxed plugins require Cloudflare’s dynamic workers. If you’re moving from self-hosted to Cloudflare, plugins will gain sandbox protection. Moving from Cloudflare to self-hosted will lose it — plugins will run in-process without isolation.

The Strongest Counterargument (and Why It Falls Short)

Some argue that a simple database dump is sufficient for EmDash, just as it is for WordPress. After all, the database holds content, settings, and user data. Media can be re-uploaded. Code is in Git. Why overcomplicate it?

That argument misses two realities. First, EmDash’s database is not a relational monolith like MySQL. On Cloudflare, it’s D1 (SQLite-based). D1 snapshots are not a standard feature yet. On self-hosted, SQLite file backups are straightforward but require the application to be stopped or in read-only mode to avoid corruption. Second, the export tool captures relationships (taxonomies, custom field bindings, SEO metadata) in a structured format that a raw SQL dump cannot guarantee. If you ever need to restore to a different database engine (e.g., moving from D1 to PostgreSQL), the SQL dump is useless. The JSON export is portable.

The export tool is the correct default for content. Database snapshots add a safety net for the configuration layer, but should not replace the structured export.

Automating Backups

EmDash does not yet ship a built-in scheduler. You can automate using external tools.

  • Content export: Use the API endpoint. Generate an API token with content:readcodecodecodecodecode scope, then call GET /api/exportcodecodecodecodecode. Save the response. A simple cron job can run this nightly.
  • Media backup: Use rclone synccodecodecodecodecode on a schedule.
  • Configuration: Keep emdash.config.tscodecodecodecodecode in Git. Store secrets separately.

For a self-hosted SQLite instance, a daily cpcodecodecodecodecode of the database file (after a PRAGMA wal_checkpoint;codecodecodecodecode) provides point-in-time recovery.

When Backups Fail: The Plugin Data Blind Spot

There is one scenario where a standard backup leaves you exposed. Plugins that store data outside the content model — for example, a form plugin that writes submissions to a separate table or an external service — will not be captured by the built-in export. The export only knows about content types registered in the schema. If a plugin creates its own storage, you must back that up independently.

Check each plugin’s documentation. If it uses the official EmDash storage API, the data is included. If it writes to a custom D1 table or an external database, you need a separate backup strategy for that table.

This is the edge case that catches most new users. Plan for it now, not after a crash.

Questions answered
  • What does the EmDash export tool include?The export tool includes all content items as structured JSON, content type definitions, media metadata, taxonomy associations, and SEO fields.
  • How do I back up media files for a Cloudflare-deployed EmDash site?Use rclone to sync your R2 bucket to another location, or enable R2 replication to another bucket.
  • What is the plugin data blind spot in EmDash backups?Plugins that store data outside the content model, such as form submissions in separate tables, are not captured by the built-in export and require independent backup.
Share This Article