Choose stateful mode during creation when an application needs a local data volume. This mode fixes one replica to one server. It does not use dynamic placement, automatic scaling, XConfig, or Guardian.
Create
- Select the storage server and verify free space.
- Create or identify its volume.
- Choose the database template or image.
- Review required environment variables and credentials.
- Mount the volume at the image’s actual data directory.
- Save, inspect startup logs, and write test data.
The PostgreSQL 18 template mounts /var/lib/postgresql and leaves PGDATA at the image default. MariaDB 12 mounts /var/lib/mysql. Verify the data path and initialization rules when changing the image or environment variables.
Generated database passwords are application configuration. Review them and manage access appropriately rather than assuming all environment values are hidden.
Updates and availability
Take a consistent backup before a data-format change and test restoration. Application rollback restores configuration, not the previous database state.
Failure and migration
If the server is unavailable, selecting another server with a same-named volume does not recover the data. Restore or migrate the data through your storage procedure, then verify the new deployment.
Deleting the application retains its volume. Track the original server and volume name before cleanup; volume management handles the separate deletion.