Restore an instance
This page puts a backup taken with ./quizdock backup back in place, on the same server or on a new one.
Restore a backup
Section titled “Restore a backup”-
On the server, in the instance’s folder, make sure the instance is running (
./quizdock status): the restore runs the database tools inside the containers. -
Restore:
Terminal window ./quizdock restore ./backups/quizdock-20261003-030000The folder must contain
database.sql, and in the full setupkeycloak.sql. The script asks for confirmation. -
Check the result:
Terminal window ./quizdock doctor
What it does
Section titled “What it does”Compose and full:
- Stops the application container.
- Loads
database.sqlinto the QuizDock database. The dump starts by dropping the objects it recreates. - Full setup: stops Keycloak, loads
keycloak.sql, starts Keycloak again. - Copies
media/andstore/into their volumes. - Starts the application.
Standalone: loads the database while the container runs, copies media/ and store/ into it, then restarts the container.
What it leaves alone
Section titled “What it leaves alone”.env. The backup’senvfile is not put back. Compare it with the current.envand copy what you need. In particular, the database password in.envmust stay the one the current database volume was created with.- Files added since the backup. Media and templates are copied over the current folders; files the backup does not have stay where they are. The hourly media clean-up deletes the files no media points to.
- The
branding/folder, which the backup does not hold.
Keep the database and the media from the same backup. A database older than the media folder is detected: the application then stops deleting stored files and says so in its log, but the media it cannot find are not shown until the two match.
Move to another server
Section titled “Move to another server”-
On the old server, in the instance’s folder:
./quizdock backup ./move. -
Copy
./move, thequizdockscript and the Compose files (docker-compose.prod.yml, and for the full setupdocker-compose.full.ymlandkeycloak/) to the new server’s instance folder. -
On the new server, in that folder, reuse the old configuration:
Terminal window cp ./move/env .envchmod 600 .env./quizdock up./quizdock restore ./move./quizdock doctorOr run
./quizdock initinstead of copyingenv, and answer as before. -
If the address changed, update
APP_PUBLIC_URL, the identity provider’s redirect addresses, and in the full setupPUBLIC_HOST.
Settings changed in the administration are in the database: they move with it.