springcloud-community / springcloud-comment

0 stars 0 forks source link

post/2022-03/commons-exec-backup-database/ #25

Open utterances-bot opened 4 months ago

utterances-bot commented 4 months ago

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/

hendisantika commented 4 months ago

Is there any full source code on github?

Thanks