---
title: "Backups & Restore"
description: "What to back up for an Academy & Exam OS installation (database, private configuration, installation marker, storage and the uploaded website images), how often, and how to restore it on the same or a new host."
url: "https://osdots.com/docs/academy-exam-os-backups/"
updated: "2026-09-30"
category: "Product Documentation / Academy & Exam OS"
---

# Backups & Restore

An Academy & Exam OS installation consists of four parts, plus the website images you upload. Back them up **together**, because they only work as a set.

| What | Where | Why |
| --- | --- | --- |
| The database | Your MySQL or MariaDB server | Every account, question, test, result, setting and page |
| The private configuration | `Web/config/app_local.php` | Security salt and database credentials. It **cannot be regenerated**: without it, sessions, stored credentials and the installation cannot be read. |
| The installation marker | `Web/config/installed.php` | Version, installation identifier and mode |
| Private storage | `Web/storage/` | Uploaded media, the installation's encryption keys and, for Single Site and Multi Site, the licence activation files |
| Website images | `Web/webroot/images/user-*` | The copies of the logo, homepage slide and blog images you uploaded in Website & CMS. The public website serves these copies, and they are not recreated automatically. |

The other application files (`src/`, `templates/`, `vendor/`, the rest of `webroot/` …) come from the package and do not need a backup — unless you customised them. If you did, back up your changes as well.

## How to back up

1. Dump the database with your hosting panel's backup feature or with `mysqldump` (on MariaDB, `mariadb-dump`, which takes the same options). See the example command below.
2. Copy `Web/config/app_local.php`, `Web/config/installed.php`, the whole `Web/storage/` folder and the `Web/webroot/images/user-*` files.
3. Store the set in a location that is **not** inside the website folder and not on the same disk as the site.

Example database dump (replace `academy` with your database name):

```
mysqldump --single-transaction --routines --triggers academy > academy.sql
```

Daily backups kept for at least two weeks are a sensible default. Take an extra backup immediately before every update.

> **Important:** The backup contains your database password and encryption keys. Store it as securely as the site itself.

## How to restore

1. Upload the **same package version** to the target host and set up the folders as in [Installing Academy & Exam OS](https://osdots.com/docs/academy-exam-os-installation/), but do **not** run the installer.
2. Restore the database dump into an empty database.
3. Restore `Web/config/app_local.php` (adjust the database credentials and the site address if they changed), `Web/config/installed.php`, `Web/storage/` and the `Web/webroot/images/user-*` files.
4. Make `Web/tmp/`, `Web/logs/`, `Web/storage/` and `Web/webroot/images/` writable again.
5. Open the site. It starts directly with the restored data; the installation marker keeps `/install` locked.

**Single Site and Multi Site:** if the host name changed, deactivate the licence on the old host before activating it on the new one. See [Licence Activation & Deactivation](https://osdots.com/docs/academy-exam-os-licence-activation/).

## Test your backups

Restore a backup into a test host or a local environment at least once after setting it up, and sign in. A backup that has never been restored is not a proven backup.

## Related documents

- [Updating Academy & Exam OS](https://osdots.com/docs/academy-exam-os-updates/)
- [Security Checklist](https://osdots.com/docs/academy-exam-os-security/)
- [Licence Activation & Deactivation](https://osdots.com/docs/academy-exam-os-licence-activation/)

## Watch the Video Tutorial

This topic is also covered in [Academy & Exam OS Video Tutorial 12: Updates, Backups, Security & Support](https://osdots.com/docs/academy-exam-os-video-tutorial-12/) ([watch on YouTube](https://www.youtube.com/watch?v=NxyPdFiEwWs)). [All Academy & Exam OS video tutorials](https://osdots.com/docs/academy-exam-os-video-tutorials-start-here/).
