Tutorials > How to install and configure a Database Server on Jelastic Cloud

How to install and configure a Database Server on Jelastic Cloud

Published on: 26 March 2020

Database Jelastic Cloud

Jelastic Cloud is a cloud solution that combines the PaaS (Platform as a Service) model and the CaaS (Container as a Service) model designed to allow DevOps to build complex infrastructures in just a few clicks, by using the Jelastic web interface.

This tutorial shows all the necessary steps to create a virtual environment with Jelastic Cloud and configure it in order to host a Database Server and set up automatic backup, by using the scripts provided by Jelastic Cloud.

Creating a new environment

Enter the Jelastic Cloud management panel and then press the "NEW ENVIRONMENT" button located at the top left.

New Enviroment

The configuration tab of the new environment will be displayed.

New environment

If necessary, delete any available Application Servers and enter the database you wish to install. In this example, MariaDB.

Adjust Cloudlets according to the possible use of resources. Remember that reserved Cloudlets are dedicated hardware resources that are always active regardless of the workload. Reserved Cloudlets are also less expensive than dynamic Cloudlets, which, instead, represent the maximum resources that can be allocated to the node in case of need in order to manage sudden loads.

Enter the disk space limit, enable or disable the public IP address according to your needs, and enter the name of the new environment. Here called ‘dbserver.’

Start the installation of the environment by clicking on the "Create" button.

Creating a database

After completing the installation of the Jelastic instance, press the "Open in Browser" button for the newly created instance:

Open in Browser

The phpMyAdmin login page for the newly created database will be displayed.

To access, use the credentials received sent by email from Aruba Cloud.
PhpMyAdmin access

Access the User Accounts screen.

PhpMyAdmin User Accounts

Proceed by adding a new user and tick "Create a database with the same name and grant all privileges" to create the relative database.
Create new PhpMyAdmin database

Setting up automatic backups

Let’s see how to create automatic backups of our database using the scripts provided by the Jelastic Cloud environment.

Click on the "Config" button next to the database instance.

Instance configuration

Now, click on the "cron" folder in your favorites and open the "mysql" file.

Cron

Inside the file, there are some examples of configurations that can be used for our automatic backup.

Backup configurations

Then, enter a new line to specify the backup frequency, and use the syntax shown above to specify your username and password.

Cron backup script

Pay particular attention to the "-c" parameter which allows you to indicate the maximum number of backups to be kept over time.

Once the procedure is completed, simply save the file you just edited and wait for the backup to run, according to the frequency you specified.

All backups are saved in the "backup" folder in your favorites.

Backup folder

Use the "Download" command to download the backup locally.

Download backup