Backup & Export MySQL servers
This chapter presents the following DMK-MySQL backup scripts: MySQL backup “mbackup.sh”. And MySQL dump “mdump.sh”
The “mdump.sh” wrapper script for MySQL dumps is launched with following option to ensure all the database are backed up in the textual backup:
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:
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 MySQL dump or backup operation should be launched. This parameter is always required.
–c or –-configfile
ℹ️The dbi services best practice consist of saving the configuration file under the database admin directory which makes the command-line parameter “ConfigFile” useless
Otherwise the command-line parameter becomes mandatory
–d or –-databasename
Optional parameter if you want to backup only one specific database.
a or --alldatabasessinglefiles
Optional parameter if you want to have a separated backup file per database.
BckPath or DumpPath
ℹ️ The DumpPath parameter belongs to the MySQL dump script “mdump.sh”
ℹ️ The bckPath parameter belongs to the MySQL 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 MySQL operation will abort!
LogPath
Compress
ℹ️ The compress option is only available for the MySQL dump script “mdump.sh”
PreScript
PostScript
Customer
NoSuccessMail
MailRecipients
SmtpServer
MailFrom
Last updated