Deploy & admin
Database backups and recovery
Exactly what the shipped backup does - a full MySQL dump on every deploy and update, kept on the same disk, without uploads - and the off-host arrangement a school has to add before loading real data.
Deploy & admin guide for day and boarding schools.
Last updated August 29, 2026
This page describes what a Schoolyi deployment does today, not what a backup policy ought to look like. The distinction matters, because the two are not the same thing and a school that assumes otherwise can lose a term of records. Read the first section as the current position and the second as work you own.
What ships
npm run deploy and npm run update run a full mysqldump before Prisma migrations, compress it, and write a new file under backups/mysql/deploy/ on the same server. Previous deploy dumps are kept. The dump contains the database and nothing else. It is a rollback aid for a migration that goes wrong, and it is not a disaster-recovery plan, because the copies still live on the same disk.
| Question | Answer today |
|---|---|
| When does it run? | Before migrations on npm run deploy and npm run update. Hourly and daily timers also dump, and those copies expire. |
| How many deploy copies are kept? | All of them. The update does not delete an older deploy dump |
| Where does it live? | backups/mysql/deploy/schoolyi-<utc>.sql.gz, on the same disk as the database |
| Does it include uploaded files? | No. Database only |
| Is it encrypted? | No. It is a gzip of a plain dump, and it contains personal data |
| Is there a restore script? | No. Restoring is a manual MySQL import |
| Is there replication or failover? | No. One host, one MySQL instance |
What a school must add
- A scheduled dump independent of deploys, so the newest copy is hours old rather than however long since the last update
- Copies held off the server, because a backup on the failed disk is not a backup
- A copy of the uploads directory alongside the database, taken at the same time
- Encryption at rest for those copies - they contain student and family personal data
- A rehearsed restore into a staging database, which is the only thing that turns a file into a recovery plan
- Your own retention period, and a written recovery objective once the drill has proved a realistic figure
Common questions
Quick answers in plain language.
Is there an automatic nightly backup?+
Hourly and daily timers also run, and those copies are pruned by age. Separately, npm run deploy and npm run update each write a new full dump under backups/mysql/deploy/ and leave every previous deploy dump in place. A missing mysqldump stops the update before any migration.
Are uploaded documents and photographs included?+
No. The dump covers the database only. Uploads live on the server disk, survive redeploys, and are copied nowhere. A school that loses the host loses every admission document and receipt attachment unless it arranged its own copies.
What is the recovery time objective?+
There is not a published one, because no restore drill has been completed. The restore path is a manual MySQL import of the dump. Quoting a figure that nothing has been tested against would be worse than saying it is outstanding.
The deploy log says mysqldump was not found. Does the update still proceed?+
No. The update stops before migrations. Install default-mysql-client on the server and run npm run update again. Existing database rows are left as they were.
Related searches
School leaders and IT teams often search for: MySQL backup schools, and ERP disaster recovery.

