Using commons-exec to backup MYSQL database in spring boot application - Spring Cloud
mysqldump is a database backup program provided by mysql. It dumps the data stored in the database into SQL statements that are output to standard output.
Basic Usage:
1 mysqldump -u[username] -p[password] [database] > [sql file] The > symbol is a redirector under linux, redirecting the standard output to a file.
mysqldump You can refer to the official documentation for more detailed usage.
Use in spring boot applications Start a new subprocess via commons-exec to execute mysqldump to complete the backup.
Using commons-exec to backup MYSQL database in spring boot application - Spring Cloud
mysqldump is a database backup program provided by mysql. It dumps the data stored in the database into SQL statements that are output to standard output. Basic Usage: 1 mysqldump -u[username] -p[password] [database] > [sql file] The > symbol is a redirector under linux, redirecting the standard output to a file. mysqldump You can refer to the official documentation for more detailed usage. Use in spring boot applications Start a new subprocess via commons-exec to execute mysqldump to complete the backup.
https://www.springcloud.io/post/2022-03/commons-exec-backup-database/