Skip to content

using mysql-client in docker container to dump special table data with conditions

License

Notifications You must be signed in to change notification settings

rockerway/mysql-dump-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql-dump-tool

using mysql-client in docker container to dump special table schema and data with conditions

Directory Structure

.
├── configs
│   └── .env.default    # env example
├── out                 # dump result
├── targets             # special DB, table, fields, conditions config
├── .gitignore          # git ignore config
├── Dockerfile          # operation env instructions
├── dump                # script
└── Makefile            # script entry point

Run

Before run the script, you need create env file in configs folder and target file in targets folder to define MySQL connect information and what DB and tables data you want.

field description
env_file_name env file name in config folder
target_file_name target file name in targets folder
docker_network_name (optional) docker network name, if you need operate container in exist network, you can set it.
docker_container_name (optional) docker container name that you want to link.
make run <env_file_name> <target_file_name> [docker_network_name] [docker_container_name]

About

using mysql-client in docker container to dump special table data with conditions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published