The executions of “mdump.sh” or “mbackup.sh” requires a configuration file, which contains the following parameters.
The script requires command lines argument in addition to the configuration file. Some of the configuration file parameters are also available in command-line. The parameters given in command line are from higher priority compared to their configuration values. Which allow different behave using the same configuration file.
Example:
mdump.sh–s ${MYSQL_SERVER}
mbackup.sh–s ${MYSQL_SERVER}
Parameters
A hyphen character prefixes the command line parameters as they are be used within a shell.
–h or –help
Display the Synopsis.
–s or -–sid
The target database on which, the MariaDB dump or backup operation should be launched. This parameter is always required.
Optional parameter if you want to have a separated backup file per database.
{mdump|mbackup}.sh –s ${MSQL_SERVER} –a
BckPath or DumpPath
#*************************************************************# DumpPath# MySQL dump destination# Default is : "" - $DMK_MYSQL_ADMIN/backupDumpPath=""
#*************************************************************# BckPath# MySQL backup destination# Default is : "" - $DMK_MYSQL_ADMIN/backupBckPath=""
LogPath
#*************************************************************# LogPath# Destination of the log files# Default is : "" - $DMK_MYSQL_ADMIN/logLogPath=""
Compress
#*************************************************************# Commandline : --compress or -z# Compression using# Default is : "0" - non compressedCompress=""
PreScript
#*************************************************************# Launch a pre Export script# the logfile is written under log_path# Default is : ""PreScript=""
PostScript
#*************************************************************# Launch a post Export script# the logfile is written under log_path# Default is : ""PostScript=""
Customer
#*************************************************************# Name/ShortName of the customer# Default is : "dbi-services"Customer=""
NoSuccessMail
#*************************************************************# NoSuccessMail# Default is : "0" -means the sucessmail will be sentNoSuccessMail="0"
MailRecipients
#*************************************************************# MailRecipients# comma separated list of mail recipients# Default is : "" - emptyMailRecipients="”
The dbi services best practice consist of saving the configuration file under the database admin directory which makes the command-line parameter “ConfigFile” useless
The DumpPath parameter belongs to the MariaDB dump script “mdump.sh”
The bckPath parameter belongs to the MariaDB backup script “mbackup.sh”. This script creates automatically a sub-folder for each execution (the folder name contains the start data of the backup)
If the backup or dump directory doesn’t exist, the MariaDB operation will abort!
The compress option is only available for the MariaDB dump script “mdump.sh”