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.
The configuration tab of the new environment will be displayed.
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:
The phpMyAdmin login page for the newly created database will be displayed.
To access, use the credentials received sent by email from Aruba Cloud.
Access the User Accounts screen.
Proceed by adding a new user and tick "Create a database with the same name and grant all privileges" to create the relative 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.
Now, click on the "cron" folder in your favorites and open the "mysql" file.
Inside the file, there are some examples of configurations that can be used for our automatic backup.
Then, enter a new line to specify the backup frequency, and use the syntax shown above to specify your username and password.
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.
Use the "Download" command to download the backup locally.