Scripts
This chapter presents the available scripts. All our scripts have a detailed synopsis please check the option “-h” or “—help”.
O.S Start/Stop script integration until Red Hat/Oracle Linux 7
DMK provides a tiny script, which integrated to the boot procedure serves to start & stop all the mysql services smoothly, source code:
We added the restart feature in ours scripts : mariadb.sh and mysql.sh.
Below, all steps for the implementation & integration into the boot sequence:
Firstly, copy the script to the “/etc/init.d” and set the correct privileges
Secondly, integrate the new script to the boot sequence
All necessary metadata for the Run-Levels are available within the script.
Finally, Verify the integration
O.S Start/Stop script integration since Red Hat/Oracle Linux 7
DMK provides a tiny script, which integrated to the boot procedure serves to start & stop all the mysql services smoothly, source code:
Below, all steps for the implementation & integration into the boot sequence:
Firstly, copy the script to the /usr/lib/systemd/systemd” systemd source code repository and set the correct privileges
Secondly, reload systemd and enabled the new service
All necessary systemd link and dependencies are automatically performed by the O.S
Finally, verify the integration
Tail the systemd logfile
mariadb.sh and mysql.sh
This script serves to start, stop and restart either all databases simultaneously or a specific database.
Syntax :
Without MYSQL_SEVER parameter, it will manage all instances on the server.
dmk-run.sh
This script prints the status of MariaDB components. It’s commonly launched with the short aliases “sta”, “ser” or “u”.
Please check the respective platform script as the features differ (i.e. hiding stopped components)
Syntax
housekeeping.sh
dbi services offers an intelligent housekeeping script to perform several types of operations on log files which are valid and identical for Linux/Unix systems.
Archive & Truncate the Alert*.log or the dr*.log (Dataguard broker) log fileS
Truncate files
Delete files older than the threshold
Oracle ADRCI (Automatic Diagnostic Repository Command Interpreter) purge. This function is available for any installed oracle products which have a Diagnostic repository.
The implementation consists of
Copy the conf. template
Adapt the configuration file
This configuration file is composed of three sections:
The Definition section, set default values for all operation types
The Standard section, which is composed as follows
This above line stands for the mysql database error logs of all databases running on the machine.
The Custom section
The last feature is the customization of each line by adding digits between the double colons at the end of the line, like the 100 days from above example
The option RMDIR remove empty directories which have not been modified since the specified threshold time (keyword section)
Syntax
mysql_dump_backup.ksh
This script allows to create rapidly compressed MariaDB dumps.
Syntax
Last updated