ERPNext backup and disaster recovery

A backup is only useful if a restore works within the time your business can tolerate. This page covers the decisions, build sequence, effort drivers and restore tests for ERPNext recovery.

On this page

Why ERPNext backup needs a tested restore plan before go-live

An ERPNext instance holds the accounting ledgers, stock movements, production orders and customer records that your finance and operations teams depend on, and most of those records cannot be rebuilt from anywhere else. A backup that exists but has never been restored is a hope, not a control. Before go-live, you need evidence that a restore brings back a working site with correct balances, and that someone on your team or your partner's team has done it on a copy of production. The only proof of recovery is a completed restore.

The bulk of ERPNext data sits in MariaDB, with uploaded and generated files kept in the site's files directory. A bench backup captures both the database and those files for a site, but it does not on its own cover the rest of what a rebuild needs: the custom apps you installed, the apps list and version pins, site configuration such as the encryption key and mail and scheduler settings, Nginx or TLS configuration, and any secrets held outside the site. If the server or the data center is lost, a backup kept only on the same host or in the same account gives you nothing to restore from. Confirm where each copy is stored, who holds the access, and whether a copy can be read without the original infrastructure.

Write the restore plan as a runbook with named owners and a rehearsal date. It should cover the restore target (a clean server or container set), the order of steps, how the restored site is checked (open ledgers, stock balances, scheduled jobs, user logins), and how long your finance team needs to sign off. Ask your partner or hosting provider to state, in writing, which restore they have tested, on which ERPNext version, and what they did not test. Repeat the rehearsal after each major change, including upgrades, so the plan matches the system you are actually running.

Which ERPNext parts hold data you must be able to recover

An ERPNext site is spread across several places: a database, file storage, the bench directory, custom app code, a cache layer and, in containers, volumes and environment files. Losing any one of them can leave a restored site incomplete, unusable or unable to start, so each needs its own backup path and restore check.

MariaDB database

MariaDB holds the transactional records (invoices, stock ledgers, journal entries, customers and most configuration) for each site. It is the component you cannot rebuild, so it anchors your recovery point. Confirm how often bench backups run, where the SQL dumps are written, and whether you have point-in-time recovery from MariaDB binary logs. Test a restore to a separate host before you rely on it.

ERPNext data docs

Public and private site files

Site files include attachments, uploaded documents, generated print outputs and images. Records in the database point to these files, so a database restore without them leaves broken attachments and missing print history. Confirm that the backup includes both the public and private file folders for each site, and that file permissions and ownership survive a restore.

Bench directory and site configuration

The bench directory holds each site's configuration file, installed app list and encryption keys, along with the apps' code. Without the encryption key and site configuration, restored encrypted fields may be unreadable and the site may not start. Confirm that these files are backed up separately from the database, that secrets are stored in a protected vault, and that access to backup copies is restricted.

Custom apps and their source

Custom Frappe apps contain your scripts, DocTypes, print formats and integrations. If the only copy lives on the production bench, a rebuild after a failure may not match the running system. Confirm that every custom app is in version control with tagged releases, that the exact commit deployed to each site is recorded, and that a clean server can reinstall those apps against the same ERPNext version.

Redis cache and queues

Redis holds cached data and background job queues. Its contents are generally treated as rebuildable, so most recovery plans do not back it up. The risk is in jobs that were queued but not yet run at failure time, which may need to be reviewed after restore. Confirm that your plan accepts losing in-flight jobs, and that scheduled tasks resume once workers start.

Docker volumes and Compose environment file

In container deployments, data lives in named volumes for MariaDB, sites and logs, while the Compose environment file sets database credentials, hostnames and image tags. Losing the volumes loses data, and losing the environment file or the exact image tag can stop the platform from starting cleanly. Confirm that volumes are backed up on a schedule, that the environment file is stored securely outside the host, and that you can redeploy the same image version.

frappe_docker repository

Choosing a backup method, offsite target and point-in-time option

This table compares four ways to protect an ERPNext site, from bench backups alone to provider-managed backups on Frappe Cloud. Read each row against your hosting model, your recovery time expectations and the staff you have to run restores. The main takeaway is that a local bench backup is only the starting point, and each step up adds storage, restore steps or dependence on a provider.

OptionWhen it fitsOperational cost
Bench backups aloneSmall single-site installs where a same-server copy is acceptable for a short test periodLow storage setup, but a server loss or disk failure can remove both the database and the backups. Restores need a staff member who knows bench restore
Bench backups plus scheduled offsite copiesSelf-hosted sites that must survive loss of the host, and where your team can run restoresRecurring storage and transfer cost, plus staff time to check copies, rotate retention and document the restore runbook
MariaDB binary log point-in-time recoverySites where losing hours of transactions is unacceptable and a DBA can manage binary loggingNeeds binary logging enabled and retained, extra storage for logs, and DBA time. Confirm settings with the MariaDB documentation and your DBA before relying on it
Provider-managed backups on Frappe CloudTeams that want hosting and backups handled by the platform provider and accept that provider's backup termsRecurring hosting fees, less control over retention and restore timing, and dependence on the provider for restores. Confirm backup scope and retention with Frappe

How to set up ERPNext bench backups and offsite copies step by step

This sequence takes a self-hosted ERPNext site from an unknown backup state to scheduled, encrypted, offsite copies that have been proven restorable on a scratch site. Each step closes with a check you can record.

  1. Inventory the sites, apps and bench version

    Start by listing every site on the bench, the apps installed on each site (ERPNext, custom apps, third-party apps), the Frappe and ERPNext versions, and where the bench directory and sites folder live on the server. Record the database engine and any file storage locations, such as private and public file folders, because these are the pieces a backup must cover. Confirm the versions against the supported versions page before you change anything. The step is done when you have a written inventory signed off by the person who owns the ERP, and every site has a named owner.

  2. Confirm the bench and Frappe version support

    Check that each site runs a version still listed as supported on Frappe's supported versions page, and that the bench command line tool in use matches the version the sites were installed with. Note any custom app whose compatibility with the installed version is not documented, since a restore onto a different version can fail in ways a backup file will not reveal. If you use Frappe Cloud, confirm the plan and backup settings in the dashboard instead. The check is a short version record per site that the team can point to during a restore.

  3. Schedule database and file backups

    Configure the bench backup command family to produce database and file backups on a schedule, using a system scheduler such as cron, run as the user that owns the bench. Confirm the exact flags, retention options and whether files are included by default with the bench version you have installed, since these options vary between releases. Set a retention period that your recovery requirements justify, and write the schedule to a log. The check is a backup file listed in the backup directory after a manual run, followed by a scheduled run that appears in the log without errors.

  4. Encrypt and copy backups offsite

    Encrypt each backup archive before it leaves the server, using a key or passphrase held outside the ERPNext server, then copy it to an offsite location on a separate storage account or network path that the ERP administrators cannot change with their everyday credentials. Generate a checksum for each archive at creation and store it with the copy. Decide who can retrieve offsite copies and how that access is logged. The check is a matching checksum for the newest archive in the offsite location, computed independently from the copy on the server.

  5. Store configuration and secrets separately

    Back up the site configuration files and the encryption keys, database credentials, API secrets and integration tokens separately from the data backups, in a secrets store or sealed record with restricted access. A database backup restored without its matching site configuration and keys will not bring the site back in a usable state. Record which secrets a rebuilt server needs and where each one is kept. The check is a restore checklist that lists every secret by name and location, reviewed by someone other than the person who wrote it.

  6. Enable binary logging for point-in-time recovery

    Skip this step if daily backups meet your recovery needs. If you need to recover to a moment between backups, enable binary logging on the MariaDB server so changes are recorded in sequence, then store the binary logs offsite on the same schedule as the backups and set retention so logs cover the gap between full backups. Confirm the procedure for replaying logs against a restored database with your MariaDB version, since the replay steps depend on the version and on how the backup was taken. The check is a binary log file created after a test transaction and copied offsite with a matching checksum.

  7. Prove restores on a scratch site

    Restore the newest offsite backup to a scratch server or scratch site that is not connected to production users or integrations, then compare record counts for key DocTypes and confirm that files open. Disable outbound email and scheduled jobs on the scratch copy first so it does not send messages or post to external systems. Repeat the restore on a set cadence that your team agrees. The check is a documented restore that opens in the browser, with record counts matching the source at the time of the backup.

  8. Record the procedure and owners

    Write a short runbook covering the inventory, schedules, offsite locations, access paths, secret locations, restore steps and contacts, and store it where the team can reach it during an outage, which may not be on the ERP server itself. Assign an owner for each backup job and each restore test, and set a review date. The check is a runbook that someone outside the original build team can follow to restore a scratch site without asking questions.

How backup, offsite copy and restore paths connect

The diagram starts at the production bench or container host, where the MariaDB database and site files are backed up together. Backups are encrypted before they cross the trust boundary into the offsite store. Site configuration and secrets are kept in a separate secrets store, so a copy of the backups alone cannot rebuild a working site. Restores flow only into a scratch environment, where you verify the data before any production recovery. Check that each arrow has a tested owner and that the scratch restore is run on a schedule.

Production backups cross into offsite storage, and restores are tested in scratch first.

How recovery differs for bench, Docker and Frappe Cloud deployments

On a self-managed server installed with the bench command line tool, your team owns the whole recovery chain. Backups and restores run through bench on the host, which captures the site database and the site files. Recovery depends on the bench, the apps and the Python and Node environment being rebuilt to match the backup, so the restore target must run the same ERPNext and Frappe versions as the source.

  • Backup command: Confirm which bench backup options your team uses, whether database only or database with public and private files, and where the archives are written on the host.
  • Offsite copies: Backups kept only on the same server fail together with it. Confirm who copies archives offsite, how often, and how they are encrypted.
  • App versions: Record the installed apps and their commit or tag for every backup, so a restore can rebuild the same code.
  • Restore rehearsal: Restore into a separate bench on a clean host at least periodically to prove the archives work.
  • Ownership: Name the person who runs a restore at 2 a.m. and confirm they have server and database access.

Check that the backup job reports failures to someone who acts on them, and that a restore has been timed end to end.

What drives backup and recovery effort and cost

This table lists the factors that change how much work ERPNext backup and recovery requires and what it costs to run. Read each row as a question to put to a partner: what changes in the work, and what should the quote show. The main takeaway is that restore scope and recovery targets, not backup storage, usually decide the effort.

DriverWhy it raises effortHow to keep it down
Database and file volumeLarger MariaDB schemas and public or private file stores lengthen backup windows, offsite transfers and restore runs, and make restore tests slower to repeat.Confirm current sizes with the owner, schedule backups off peak hours, and ask the partner to size restore tests from a realistic copy.
Number of sites and companiesEach bench site has its own database and files, so every site must be backed up, verified and restored separately, multiplying checks.Consolidate where the business allows, standardize backup scripts across sites, and ask for a per-site restore checklist in the quote.
Custom apps needing rebuildA restore onto a new server may require rebuilding custom Frappe apps at matching versions before data can load, adding build and dependency work.Keep custom app source in version control, record app versions with each backup, and ask whether the quote includes a rebuild rehearsal.
Environments that must be restoredProduction, staging, and a disaster recovery site each need their own restore procedure and configuration, and each must be proven to work.Limit the number of environments that get full restores, use staging restores to test procedures, and ask which environments the quote covers.
Recovery time and data-loss targetsShorter recovery time objectives and tighter data-loss limits require more frequent backups, point-in-time options for MariaDB, and standby capacity, which add cost and design work.Ask the business to set targets per process (accounting, stock, production), and tier the design so only critical data gets the tightest targets.
Compliance evidence requirementsAuditors and internal reviewers may ask for backup logs, restore test records, access controls on backup copies and retention proof, all of which must be produced and kept.Agree the evidence list before build, automate logs and restore test records, and confirm with your assessor which evidence they expect.
Staff who must be trainedRestores are rare, so administrators need practice to run them under pressure, and turnover means training repeats; untrained staff raise error risk and delay recovery.Write runbooks with exact commands, rehearse restores on a schedule, and ask the partner to include operator training and a handover in the scope.

Protecting backup copies, encryption keys and site secrets

A backup that an attacker can read, alter or delete does not protect the ERPNext site. The controls below cover how copies are encrypted, who can reach them offsite, how the site configuration secrets are kept, and how restores are authorized and logged. Confirm each one against your own storage provider and security policy before you rely on it.

Encryption in transit and at rest

Backup archives contain the MariaDB dump, private files and sometimes attachments with personal or financial data. Ask whether the copy job sends data over TLS to the offsite target and whether the storage provider encrypts objects at rest, and who holds the keys. If you encrypt archives yourself before upload, record where the key lives and test that a restore works from a clean host. Confirm both settings with your storage provider rather than assuming the default.

Least-privilege offsite credentials

The account that uploads backups should only be able to write new objects to one bucket or path. It should not be able to list, overwrite or delete older generations, or read other buckets. Use separate credentials for the backup job and for any restore operator, and rotate them on a schedule your policy sets. Confirm the permission scope in the provider console, because a broad key stored on the bench host is a common path to losing every copy at once.

Protecting the site configuration file

Each site keeps a site_config.json file with the database password, encryption key and other secrets. A backup of the database without this file cannot be restored in the same way, and a copy of it exposes the site. Store it encrypted in the backup set or in a secrets manager, restrict file permissions on the bench host, and check that the encryption key is recorded separately from the archive. Treat any copy of this file as a credential.

Access logging for backups and restores

Log who created, downloaded, deleted and restored each backup, and keep those logs outside the ERPNext host that they describe. Review access to the backup bucket on a regular basis and alert on deletions or unusual downloads. Ask your provider whether object access logs and versioning or object lock are available and how long they are kept. Logs only help if an administrator on the production server cannot edit them.

Restricted restore rights

Restoring a site overwrites live data, so restore rights should sit with a small named group separate from day-to-day ERPNext administrators. Require a documented approval step before a restore to production, and restore first to an isolated test host to verify the result. Record which backup set was used and why. Confirm this split with your change management process so that a single compromised account cannot both delete data and replace it.

Keeping copies out of reach of production admins

If the same administrator can log into the ERPNext server and the backup account, a compromise of that person can destroy production and every copy together. Keep offsite credentials out of the bench user's environment, use a separate account or tenant for storage, and consider write-once retention that stops deletion within a set period. Ask your team to document which identities can reach each backup location and test whether a production admin account can delete a backup.

How to prove a restore works before you need it

A backup is only proven when a restore from it succeeds, so schedule a restore test against the latest backup and treat it as a recurring control, not a one-time exercise. Restore the database dump and the files from the same backup set into an isolated scratch environment running the same ERPNext and Frappe version as production. Keep that environment off the network paths that reach production email, payment gateways, bank feeds and scheduled integrations, because restored sites can otherwise send messages or post transactions. Run bench migrate on the restored site, then work through the post-restore checks in the order a finance or operations user would hit them.

The checks should prove data, not just that the site loads. Compare record counts for key DocTypes such as Sales Invoice, Purchase Invoice, Journal Entry, Item and Stock Ledger Entry against a snapshot taken from production at the time of the backup. Run the Trial Balance and General Ledger reports and the Stock Balance report for a fixed date and match the totals to that snapshot. Open a sample of attached files, such as invoices, scanned contracts and print outputs, to confirm they are readable. Confirm that custom apps load without errors, that Server Scripts and integrations behave as expected where they are enabled, and that background jobs such as scheduled emails and queued reports actually run through the workers. Ask your partner or internal team to write these checks down with expected results before the test begins, so the outcome is not judged after the fact.

Record the elapsed time from the start of the restore to the point where finance and operations can sign off, and compare it with the business recovery target agreed by the business owners. A restore that is correct but slower than the target is a finding that changes the plan, not a pass. Repeat the full test after every ERPNext minor or major upgrade, after any change to custom apps or scripts, and after changes to hosting or database settings, since each can alter what a backup contains or how long a restore takes. Keep a dated test record with the backup identifier, versions, check results and timings, and confirm with your auditors which format they expect as evidence.

What to monitor, rehearse, upgrade and document after go-live

A backup set only protects you if it keeps running, stays readable and matches the software you actually run. The cards below cover the recurring checks, rehearsals and records that connect the backup job to a recovery you can complete under pressure. Confirm each item against your own hosting model, since self-hosted, container and Frappe Cloud setups assign these duties differently.

Backup job success and alerting

Confirm that every scheduled bench backup run reports success, and that a failed or missing run pages a named person rather than sitting in a log. Check that the alert covers both the database and file backups, because a job can finish while one of the two is incomplete. In containers, check the scheduler or cron job that triggers the backup, not only the container's health status. Ask your hosting provider or partner how failures are surfaced on Frappe Cloud or on your own servers.

Offsite copy age and integrity

A copy that is old or unreadable gives you the same loss as no copy. Track the timestamp of the newest offsite backup and alert when it falls behind your agreed recovery point. Verify checksums or equivalent integrity checks on the transferred files, and confirm that the encryption keys needed to open them are stored separately from the backup. Confirm the retention period and the storage location with your team, since these are decisions for your own risk and compliance requirements.

Scheduled restore drills

Restores that are never tested are assumptions. Schedule restores into a separate test site or host, using the most recent offsite copy, and time how long the process takes from start to a logged-in user. Check that the restored site runs migrations cleanly, that custom apps load, and that key documents such as recent invoices and stock entries are present. Record the results and the gaps, and agree the drill frequency with your owners.

Runbook alignment with version support

Your recovery steps depend on the ERPNext and Frappe version in use, so the runbook must change when the version does. According to Frappe's supported versions page, version 15 is planned to be supported until the end of 2027 and version 16 until the end of 2029. Review the runbook at each upgrade, and confirm the support status of your version on that page before planning a restore or migration window.

Supported versions page

Tracking frequent minor releases

ERPNext ships frequent minor releases on both supported major versions, so the running version can drift from the one your runbook and test restores were built against. Subscribe to release notifications, review changes that touch database schema or migrations, and rehearse a restore on the new minor version before it reaches production. Confirm with your partner or Frappe how patching is scheduled and who approves it.

ERPNext release notes

Owners, contacts and escalation

A recovery plan without named owners stalls at the first failure. Document who owns backups, who can approve a restore, who contacts the hosting provider or partner, and who speaks to the business when finance or stock data is unavailable. Keep contact details current, include after-hours paths, and store the document outside the ERPNext instance it protects. Review the list each quarter and after any staff change.

Questions buyers ask about ERPNext backup and recovery

Can our own team back up and recover a self-hosted ERPNext without a partner?

Yes, if you have people who can run the bench command line tool, manage MariaDB and the file system, and perform a restore on a separate server. The backup itself is a built-in bench operation, so the harder part is the surrounding work: scheduling, offsite copies, credential handling, monitoring that backups completed, and a documented restore that someone other than the original author can follow. Teams without a Linux and database administrator on staff usually find the restore drill is where gaps appear. Ask whether your team has ever restored a full site to a clean server, and how long that took, before deciding what to hand over.

What does a backup and recovery project require from our staff?

Expect to name a technical owner, a finance or operations approver who can confirm which data must be recoverable and how quickly, and someone with access to the hosting account, DNS, certificates and the database server. The partner or internal team needs a copy of the current deployment layout, the bench or Compose configuration, custom app versions and any files stored outside the database. Staff time is mostly spent confirming scope, reviewing the restore runbook and attending the restore test. Confirm who approves changes to retention and who receives alerts when a scheduled backup fails.

How does a partner price a backup and recovery scope?

A partner should price it as a fixed scope agreed in writing, with each component listed separately in the quote. Typical components include a review of your current backup setup, configuration of database and file backups, offsite copy destination and retention, monitoring and alerting, a documented recovery plan, and one or more restore tests. Cost rises with the number of environments, the size of the data, the need for point-in-time recovery, the number of custom apps and the offsite and compliance requirements. Ask which items are one-time and which recur, such as storage, monitoring or periodic restore tests. DeployOpen issues quotes from the written scope rather than a published price list.

Does Frappe Cloud already cover ERPNext backups?

Frappe Cloud hosts ERPNext sites and its pricing page lists shared site hosting from 5 US dollars per month, but you should confirm in its documentation and your plan what backup frequency, retention and restore process apply to your site. Hosting backups do not automatically answer your own recovery objectives, such as whether you hold an independent copy outside the provider, whether restores are tested against your business processes, or whether custom apps and attached files are included. Ask for the written backup policy, the restore procedure and who performs it before assuming coverage.

Do we need point-in-time recovery for MariaDB?

It depends on how much data you can afford to lose. A scheduled full backup restores the database to the moment it was taken, so everything entered after that point is lost unless you also keep binary logs and can replay them to a chosen time. Point-in-time recovery is most useful when transactions such as invoices, stock entries or journal postings are frequent and a bad change must be reversed to a specific minute. It adds work: binary logging must be enabled, logs must be retained and copied offsite, and the restore procedure must be practiced. Agree the acceptable data loss window with finance and operations before choosing the design.

How often should we run restore tests?

Run a restore test on a separate server after the first setup, after every significant change to the bench, custom apps or database version, and on a recurring schedule that your risk owner accepts. A backup that has never been restored is an assumption, not a recovery plan. Each test should confirm that the site starts, that the database and files match the backup point, that custom apps load, and that key documents and ledgers reconcile. Record the time taken and any manual steps, then update the runbook. Ask your partner or internal team to state the test scope and evidence they will provide for each run.

How DeployOpen scopes, builds, hands over and supports ERPNext recovery

DeployOpen plans, implements, backs up, documents and supports self-hosted open-source platforms inside the client's own infrastructure, including ERPNext. For backup and disaster recovery, we work from your deployment model, your recovery targets and your records of what the business cannot lose, then test the restore path before we call the work finished.

How we scope

  • Engagements are fixed-scope, with the backup targets, restore tests and deliverables agreed in writing before work starts.
  • We confirm which ERPNext sites, benches, files and MariaDB databases fall within the written scope.
  • We record which deployment model applies, whether Frappe Cloud, Docker Compose, or a manual bench install, and who owns each layer.

How we build

  • We configure scheduled bench backups of the database and public and private files, with retention settings your team agrees to.
  • We set up offsite copies inside your own accounts or data centers, with access controls over the backup storage.
  • We confirm whether point-in-time recovery for MariaDB is available in your environment and configure it only where it is supported.

How we hand over

  • You receive a recovery runbook covering backup locations, restore commands, the order of restore steps and named owners.
  • We document restore test results, including the time taken and any gaps found, so your team can judge readiness.
  • Your team is trained to run a restore on a separate environment and to read backup job logs and alerts.

How we support

  • Ongoing support, upgrades and recurring restore testing are available as retainers after handover.
  • We re-run restore tests after ERPNext upgrades, changes to custom apps or changes to the hosting layer.
  • We review backup coverage and recovery plans with your IT and compliance teams as your ERPNext footprint changes.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.