Database Configuration Files

Database Configuration Files

Platform-managed database servers include predefined directories for database configuration, cron jobs, scripts, backups, private keys, administration-panel settings, and PostgreSQL configuration files.

Configuration Folders Overview

FolderPathDatabase Types
conf/var/lib/pgsql/dataPostgreSQL
etc/etcAll database types
cron/var/spool/cronAll database types
scripts/var/lib/jelastic/binAll database types
backup/var/lib/jelastic/backupAll database types
keys/var/lib/jelastic/keysAll database types
conf.d/etc/httpd/conf.dMySQL, MariaDB, Percona, PostgreSQL

ETC Folder

The /etc folder contains common configuration files used by the database server and its administration tools.

PHP Configuration

PHP settings for the database administration interface are configured in the php.ini file inside the etc folder.

Database php.ini configuration
The database administration PHP settings are available in php.ini.

MySQL, MariaDB, and Percona Configuration

These databases use the my.cnf file for database-server configuration. The platform automatically manages the following values:

  • key_buffer_size
  • table_open_cache
  • myisam_sort_buffer_size
  • innodb_buffer_pool_size
!

Platform-managed values

To change one of these values directly in my.cnf, remove the #Jelastic autoconfiguration mark. line at the beginning of the file. Otherwise, the platform can overwrite the custom value.

Recommended override method

Any setting in /etc/my.cnf, including auto-managed settings, can be overridden by defining it in /etc/mysql/conf.d/my_custom.cnf.

MySQL my.cnf configuration
MySQL, MariaDB, and Percona database settings are managed in my.cnf.

Cron Configuration

The /var/spool/cron folder contains the database cron configuration. Use it to define recurring tasks such as scheduled database backups.

The backup cron expression is included in the configuration by default. Uncomment the required line and adjust the schedule when necessary.

Database cron configuration
Uncomment and adjust the supplied cron expression to schedule backups.

Scripts Folder

The /var/lib/jelastic/bin folder contains the default backup_script.sh script. Custom scripts can also be uploaded to this directory.

Database scripts folder
The scripts directory includes the default backup script and can store custom scripts.

Backup Folder

The /var/lib/jelastic/backup folder stores database backup files. These files can be used later to restore database data.

Database backup folder
Database backup files are stored under /var/lib/jelastic/backup.

Keys Folder

The /var/lib/jelastic/keys directory is intended for private keys required by an application or database integration.

Generate the key, save it as a file, upload it to the keys directory, and reference it using:

/var/lib/jelastic/keys/{keyName}
Database keys folder
Upload private-key files to /var/lib/jelastic/keys.

conf.d Folder

The /etc/httpd/conf.d folder stores sub-configuration files for the database administration interface.

For example, MySQL uses an administration-panel configuration such as phpMyAdmin-jel.conf. These files can be used to define access rules that allow or deny requests by IP address or domain.

Database conf.d folder
Use conf.d files to manage database administration-panel sub-configurations.

PostgreSQL conf Folder

The main PostgreSQL configuration files are stored in /var/lib/pgsql/data. This directory includes files such as:

  • postgresql.conf
  • pg_hba.conf
  • pg_ident.conf
PostgreSQL configuration file
PostgreSQL configuration files are stored in /var/lib/pgsql/data.

The platform automatically manages these PostgreSQL values in postgresql.conf:

shared_buffersCalculated from total RAM: one quarter for containers with eight or more Cloudlets, one seventh otherwise, but not less than 128 KB.
max_stack_depthCalculated by subtracting 1024 from the maximum stack size returned by ulimit -s and converting the result to MB.
!

Manual PostgreSQL changes

To change either platform-managed value manually, remove the #Jelastic autoconfiguration mark. line at the beginning of postgresql.conf. Otherwise, the platform can overwrite the custom value.

Expected Result

The database configuration manager provides access to the correct directories for database settings, scheduled tasks, backup scripts, backup files, private keys, administration-panel access rules, and PostgreSQL server configuration.

Important Notes

  • Back up configuration files before making manual changes.
  • Use /etc/mysql/conf.d/my_custom.cnf to override MySQL-family settings without editing auto-managed values directly.
  • Remove the autoconfiguration mark only when taking responsibility for a platform-managed setting.
  • Keep private keys protected and reference them through their full keys-folder path.
  • Review cron timing before enabling scheduled backups.
  • Restart the relevant database or administration service when a configuration change requires it.