What happens when you change a version in vallic.yaml, which services survive it, and how to move a database to a version that cannot read the old one.
Every service in vallic.yaml names a version:
services:
- mariadb: '11.4'
- valkey: '8.1'
That is the version your environment runs, from the next deploy. Change it, push, and the deploy brings the service up on the version you named. A version the platform does not offer is not honoured — the service stays on the current default. Software stacks lists what each service offers.
For most services that is all there is to it. For the ones that keep data, it is not always, and this page is about the difference.
Caches — Valkey, Redis, Memcached — and Varnish hold nothing that cannot be rebuilt. Move them up or down freely. Their contents may be empty afterwards; your application refills them as it is used, and a Drupal site can be helped along with a cache rebuild.
Databases — MariaDB, MySQL, PostgreSQL — search — Solr, Meilisearch — and the queue, RabbitMQ, keep data on disk in a format that belongs to the version that wrote it. The new version starts on the files the old one left. Whether it can read them depends on the engine and the direction:
| Service | Moving to a newer version | Moving to an older version |
|---|---|---|
| MariaDB, MySQL | Generally reads the older data and upgrades it in place. Once it has, the older version cannot read it again | Does not start on data a newer version wrote |
| PostgreSQL | A different major version does not start at all on the old data | Does not start |
| Solr | Reads one major version back; rebuild the index to be sure | Does not reliably read it; rebuild the index |
| Meilisearch | Does not read another version's index; rebuild it | Rebuild it |
| RabbitMQ | Keeps its queues across minor versions | Empty the queues first |
Your application's own data is never touched by any of this — only the service's files on the machine. A database that will not start is a site that is down until one of the paths below is taken, so pick the path before you push.
Take a backup — Backups → Back up now on the environment. Database backups are SQL dumps, and an SQL dump can be restored into any version. That is what makes every path below work.
Keep a dump of your own as well, over shell access:
ssh -p 2417 vc-t-acme@production.acme.vallic.cloud db-export > before-upgrade.sql
Try it on staging first. Backups → Copy from another environment puts production's data on staging; change the version on the branch staging tracks, deploy, and see what happens there rather than on your live site.
MariaDB or MySQL, to a newer version.
vallic.yaml and deploy.PostgreSQL to another major version, or any database to an older version. There are three ways, from the least to the most disruptive.
The safest, because the old environment is not touched until the new one is proven.
Create a new environment — or a new project, for production — whose
vallic.yaml names the new version from its first deploy. A database that
starts on the version you want never has old files to read.
Deploy it, then load your data into it: Backups → Copy from another
environment for a staging environment, or db-import with the dump you
kept:
ssh -p 2417 vc-t-acme@production.acme-new.vallic.cloud db-import < before-upgrade.sql
Move your files if they need to go too — see Shell access for rsync.
Check the new environment, then move your domains across and remove the old one.
When a new environment is not practical. Backups → Reset database on the environment does it in one action: a backup of the database while it still answers, then its files emptied on the machine that runs it, then the newest backup restored into the empty database. Each step waits for the one before.
vallic.yaml and deploy. On a version that cannot
read the old files the database will not start; that is expected.vallic.yaml declares, and the
backup loads into it. A backup is SQL, so any version reads it. If you
would rather load your own dump, untick the restore and db-import it.Only an Admin or the Owner can reset a database, and only by typing the environment's name — it deletes every table. Your site is unavailable from the reset until the restore finishes: do it at a quiet time, and consider switching the site offline first so visitors see a page saying so.
Only for a database that did start on the new version but whose data you
want rebuilt anyway — to shed an old format, or after an upgrade that left
things half-converted. db-import loads over what is there. A MariaDB or MySQL
dump from db-export carries DROP TABLE statements and replaces each table
as it goes; a PostgreSQL one does not, so drop the tables it will recreate
first.
drush search-api:reindex and then
drush search-api:index. An index is built from your database, so nothing is
lost that the rebuild cannot put back.vallic.yaml, deploy, then Reset
database with the backup unticked, so the one you took before you started
is what is restored.Changing a version is a commit, so it is whoever can push to the branch an environment tracks. Backing up, restoring and copying are on the environment's Backups tab, for the roles Teams lists. Resetting a database is an Admin or the Owner only.
vallic.yaml