Bulk backup of MySQL
If there are multiple libraries under the same MySQL instance that need to be backed up together, and the table filtering rules of each library are not exactly the same, follow the steps below.
Steps to follow
- Confirm default config dir has app.toml, bak.toml, prj.toml; set
[mysql]in bak.toml like single-DB backup. - Manually create a mysql_bak_request.toml request file (or JSON) and list the databases that need to be backed up this time.
- Write
include_table_list' or 'exclude_table_listin each database entry when filtering by table is required. - Perform a check first to confirm that both the database list and the filtering rules are as expected:
peppykeep backup mysql-db-list --request-file ./mysql_bak_request.toml --config-home /path/to/conf
- Perform a formal backup after checking that everything is correct:
peppykeep backup mysql-db-list --request-file ./mysql_bak_request.toml --config-home /path/to/conf --apply
results verification
- The
Actionin the output isbackup mysql-db-list ', and theDbCount `matches the number of libraries in the request file. - The databases that need to be backed up have entered this task.
- The table filter rules for each database match the request file.
- Backup files, upload results and cleanup results are consistent with this configuration.
Order Details: