Skip to content

Databases

Setup & configuration

Strapi, Piwigo Image Gallery and Metabase Reporting require a backend database. These databases are provided using mysql 8.x in a docker container and using Adminer as a database management tool in a side-container.

IMPORTANT

the exabyte server does not provide some CPU features the latest docker image of mysql:latest requires. Hence, we have to freeze the tag to mysql:8.4.0-oraclelinux8. This tag still receives updates though and should be pulled during maintenance runs.

One mysql instance is set up per server, Webserver and Piwigo Server accordingly. For ease of maintenance etc. the container version is fixed for both instances to mysql:8.4.0 although the Piwigo Server could run the latest version.

The container has the ~/docker/mysql/backups path mounted to /backups within the container to allow for easy access to dumps etc. in case of restore/backup operations.

The database content is mounted to ~/docker/mysql/data locally.

Backup & Restore

Both database instances are backed up by creating a mysql-dump of all databases, respectively. The dump is managed by a script (~/scripts/mysql/backup_mysql) and triggered by a cron job.

  • Webserver: run daily at 3.10am, backup file stored under ~cloud/google/Backups/mysql_backup.tar.gz
  • Piwigo Server: run daily at 4.10am, backup file stored under ~cloud/google/Backups/piwigo_db_backup.tar.gz

Released under the MIT License.