Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,155 of 9,155 pages
About the help in other languages
All help pages

Backups and recovery

For public bodies that must be able to restore their site after ransomware, a failed update or a mistaken deletion - what an Exponential backup contains, how to take a consistent one with maintenance mode, the secrets…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/security/backups-and-recovery.md

On this page

Backups and recovery

This page is for administrators and hosting teams of public sites, and the project managers who set recovery targets. A backup is the database and the files, taken at the same moment (10.9 Backups and restore).

Contents

  1. What to back up
  2. A consistent backup
  3. Protecting the backups
  4. Restore tests
  5. Smaller recoveries
  6. Related pages

What to back up

PathWhy
the databasecontent, users, roles, settings stored in the database
var/storage, var/<site>/storageuploaded images and files
settings/override, settings/siteaccessthe installation's settings, including secrets (database password, audit keys, mail preference secret)
your own extensions and designsif they are not in a repository
var/log (optional)later investigation; the audit trail lives under var/<site>/log/audit

Caches need no backup.

A consistent backup

  1. Maintenance mode, so nothing is written between the database and the file backup: php bin/php/maintenance.php on --message="Back soon" --until=30m --allow-root-user (--allow-admin keeps the administration reachable).
  2. The database with its engine's tool (mysqldump --single-transaction, pg_dump -Fc, the SQLite online backup, ...).
  3. The files: tar czf /backup/files-$(date +%F).tar.gz var/storage settings/override settings/siteaccess.
  4. php bin/php/maintenance.php off --allow-root-user.

On SQLite and MySQL with InnoDB the database backup is consistent without maintenance mode; maintenance mode makes database and files agree.

Protecting the backups

  • Encrypt them: they contain the database password and the audit keys.
  • Keep at least one copy off the machine and one offline, so ransomware on the server cannot reach it (Security hardening: Backups and recovery).
  • Keep several generations, as long as your records and privacy rules allow (backups contain personal data too).
  • Keep the break-glass procedure for the administrator account next to the restore procedure.

Restore tests

Restore to a test machine regularly (for example each quarter):

  1. maintenance on; under Velocity stop the server;
  2. restore the database and unpack the files; fix owner and mode;
  3. clear caches and start;
  4. check: front page, sign-in, a content page with images, ./console exp:audit verify --allow-root-user.

Record the date, the backup used, the time it took and problems found. The time is your real recovery time.

Smaller recoveries

Not every loss needs a full restore:

LostRecover with
a page moved to the trashRestore in the trash (content/trash) (The trash view)
an earlier text of a pageMake a new draft from the old version on the versions page (Versions of an object)
a user account removedonly a restore: user objects never go to the trash; prefer Deactivate and move for leavers
an archived audit day./console exp:audit restore --apply --channel=<channel> --date=<YYYY-MM-DD> --allow-root-user

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x