How to backup MySQL procedures
Default mysqldump will not take the back up of stored procedures.
So if we need to take the mysqldump including the stored procedures, the command is as follows.
#mysqldump --routines database > database.sql
Here we need to replace the name of the database accordingly.
Sometime it may required the backup of stored procedures excluding the data. We can use the following command to achieve this requirement.
#mysqldump --routines --no-create-info --no-data --no-create-db --skip-opt database > database.sql
Here we need to replace the name of the database accordingly.
That's all…