Manual Database Backups
Manual Database Backups
Certified database stacks include a ready-to-use backup script. Configure it through cron to create database backups automatically, control retention, save selected databases or tables, download archives, and restore data when required.
Backups Scheduling
Open the backup script
Click Config beside the database node and open /var/lib/jelastic/bin/backup_script.sh.

Redis exception
The default backup script is not available for the Redis stack.
Open the database cron file
Open /var/spool/cron/mysql and add a command in this format:
{frequency} {path-to-script} {script-parameters}

Backup Script Parameters
*/10 * * * * for execution every ten minutes.Special characters in passwords
Wrap a password containing special characters in double quotation marks. Escape a percent sign for cron with a backslash, for example -p "passw\%rd".
Example: back up everything every ten minutes and retain three old backups:
*/10 * * * * /var/lib/jelastic/bin/backup_script.sh -m dumpall -c 3 -u root -p passw0rd

Store Backups on Another Node or Server
Configure a mount point for the database backup directory when backups should be stored on another node or remote server. Existing files in the mount-point folder are replaced by files from the remote directory. A custom script can also run from a remote server when it has the database host and credentials.

Check Backups
After the cron task runs, open /var/lib/jelastic/backup. A successful operation creates a .bz2 archive in this directory.

Download a Backup



Restore a Database
Open the database administration panel
For the MySQL example, open phpMyAdmin and sign in with the credentials supplied after database creation.

Import the archive
Open the Import tab, choose the required backup file, and click Go.

Confirm restoration
Wait for the administration panel to display the successful import notification.

Expected Result
The selected database data is backed up automatically according to the cron schedule, retained according to the configured count, stored locally or remotely, and available for download or restoration.
Important Notes
- The guide uses MySQL as the example, but the workflow is similar for other certified database stacks.
- The default backup script is not available for Redis.
- Protect credentials stored in cron configuration.
- Verify backup archives regularly instead of relying only on task execution.
- Test the restoration procedure before a production emergency.
- Use remote storage to reduce the risk of losing backups with the database node.
