Database Configuration

In this guide, we’ll list all the main configuration files in the Cantech-managed database servers. Each line of the table corresponds to the folder with configs for the databases listed in the Database Types column.


Folder Path Database Types
conf /var/lib/pgsql/data PostgreSQL
etc /etc all
cron /var/spool/cron all
scripts /var/lib/cloud/bin all
backup /var/lib/cloud/backup all
keys /var/lib/cloud/keys all
conf.d /etc/httpd/conf.d MySQL, MariaDB, Percona, PostgreSQL

The PHP configurations are performed in the php.ini file, which is located in the etc folder.

MySQLMariaDB and Percona include the my.cnf configuration file for database management. Note that Cloud automatically manages the following settings in this file:

  • key_buffer_size
  • table_open_cache
  • myisam_sort_buffer_size
  • innodb_buffer_pool_size

If you want to manually change any of the settings from the list above, you need to remove the “#cantech cloud  autoconfiguration mark.” line at the start of the file. Otherwise, your custom changes will be overwritten.

Tip: Alternatively, you can override any of the settings in the /etc/my.cnf file 
(including ones managed by cloud autoconfiguration mark) by stating them in 
the /etc/mysql/conf.d/custom.cnf file.

The database servers include the /var/spool/cron folder with a config file, where cron jobs can be configured.

For example, you can set the scheduled backups of your database. The required cron expression is included in the cron config file by default. You just need to uncomment the appropriate line and, if necessary, adjust it based on your custom requirements.

You can find more information in the Setting Up Cronjob documentation.

This folder contains the default script. You can also use the /var/lib/cloud/bin folder for uploading your custom scripts.

The /var/lib/cloud/backup folder is used for storing the database backup files. You can use these files for restoring your database data.

The /var/lib/cloud/keys directory is used as a location for uploading private keys that are needed for your application.

Generate the key, save it as a simple file, and upload it to the keys folder. You can then use it for different cases by merely stating the path to your key, i.e. /var/lib/cloud/keys/{keyName}.

The /etc/httpd/conf.d folder is usually used to store and manage sub-configs.

For example, you can access the admin panel configuration file (depends on the database, e.g. phpMyAdmin-jel.conf for MySQL) via the conf.d folder. Use these files to set appropriate criteria for allowing/denying access by IP address or domain.

The main configuration files of the PostgreSQL database server are located in the /var/lib/pgsql/data folder. For example, it includes configs such as postgresql.confpg_hba.confpg_ident.conf, etc.

Cantech Cloud PaaS automatically manages the following two parameters in the /var/lib/pgsql/data/postgresql.conf file for PostgreSQL databases:

  • shared_buffers – calculates as a part of total RAM – quarter if a container has eight or more cloudlets, seventh part otherwise (but not less than 128 KB)
  • max_stack_depth – calculates as 1024 subtraction from the maximum stack size (response of the ulimit -s command), converted to MB

If you want to change any of these settings manually, you need to remove the “#cloud autoconfiguration mark.” line at the start of the file. Otherwise, your custom changes will be overwritten.



If you need any help contact our support, Open support ticket from client area.

Was this article helpful?

Related Articles