The major MariaDB version you start with (e.g. `10.10` or `10.11`) will be kept until you manually upgrade it. The playbook will stick to this major version and only do minor version upgrades (e.g. `10.10.1` -> `10.10.3`).
This is because newer MariaDB versions cannot start with data generated by older MariaDB versions.
Upgrades must be performed manually.
This playbook can upgrade your existing MariaDB setup with the following command:
```sh
just run-tags upgrade-mariadb
```
**The old MariaDB data directory is backed up** automatically, by renaming it to `/mash/mariadb/data-auto-upgrade-backup`.
To rename to a different path, pass some extra flags to the command above, like this: `--extra-vars="mariadb_auto_upgrade_backup_data_path=/another/disk/mash-postgres-before-upgrade"`
The auto-upgrade-backup directory stays around forever, until you **manually decide to delete it**.
As part of the upgrade, the database is dumped to `/tmp`, an upgraded and empty MariaDB server is started, and then the dump is restored into the new server.
To use a different directory for the dump, pass some extra flags to the command above, like this: `--extra-vars="mariadb_dump_dir=/directory/to/dump/here"`
To save disk space in `/tmp`, the dump file is gzipped on the fly at the expense of CPU usage.
If you have plenty of space in `/tmp` and would rather avoid gzipping, you can explicitly pass a dump filename which doesn't end in `.gz`.