All Projects → kedarvj → Mysqldumpsplitter

kedarvj / Mysqldumpsplitter

Licence: mit
MySQL Dump splitter to split / extract databases & tables from mysqldump

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Mysqldumpsplitter

Autoops
linux资产管理,cmdb,django, webssh,运维管理平台,数据库操作平台 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 340 (-6.08%)
Mutual labels:  mysql
Dokit
基于 Spring Boot2、 Jpa、 Spring Security、JWT、redis、Vue的前后端分离的后台管理系统开发平台, 用户管理、菜单管理、角色管理、字典管理、权限控制的方式为RBAC,操作日志、异常日志、接口限流、项目支持数据权限管理,支持一键生成前后端代码(支持在线预览及打包下载),支持前端菜单动态路由 可一键部署服务器应用,数据库。系统中活跃用户状态监控,监视当前系统CPU、内存、磁盘、堆栈等相关信息,基于Element UI在线表单设计及生成Vue代码。
Stars: ✭ 348 (-3.87%)
Mutual labels:  mysql
Stacker
Stacker - The environment for local web development, ready for use.
Stars: ✭ 356 (-1.66%)
Mutual labels:  mysql
Koa Vue Notes Api
🤓 This is a simple SPA built using Koa as the backend, Vue as the first frontend, and React as the second frontend. Features MySQL integration, user authentication, CRUD note actions, and async/await.
Stars: ✭ 342 (-5.52%)
Mutual labels:  mysql
Dbngin
DB Engine
Stars: ✭ 344 (-4.97%)
Mutual labels:  mysql
Php Mysql Class
Simple MySQL class written in PHP, for interfacing with a MySQL database.
Stars: ✭ 349 (-3.59%)
Mutual labels:  mysql
My Love
(都是脑图,建议使用xmind 8 打开)工程师的自我修养 -> 从 linux , 网络,MQ, Rpc, 缓存, 高可用架构,数据库,语言,全方位成长,成为技术大神,优秀的工程师 , readme 包括蚂蚁, 头条, 美团等面试思考( 拿下 offer)
Stars: ✭ 338 (-6.63%)
Mutual labels:  mysql
Interviewguide
计算机校招、社招面试八股文整理,也是《逆袭进大厂》唯一仓库,目前已收录 C/C++ 、操作系统、数据结构、计算机网络、MySQL、Redis等面试资料,未来打算继续收录Java、Python、Go等面试常见问题,坚持将此仓库维护下去。
Stars: ✭ 288 (-20.44%)
Mutual labels:  mysql
Mysql Tutorial
🌱 This is a tutorial of MySQL. In this tutorial, you can leran how to use MySQL and optimize SQL.
Stars: ✭ 346 (-4.42%)
Mutual labels:  mysql
Node Express Passport Mysql
Login Express + Passport + MySQL
Stars: ✭ 349 (-3.59%)
Mutual labels:  mysql
Dtle
Distributed Data Transfer Service for MySQL
Stars: ✭ 343 (-5.25%)
Mutual labels:  mysql
Exploits
A handy collection of my public exploits, all in one place.
Stars: ✭ 342 (-5.52%)
Mutual labels:  mysql
Gitamin
An open-source, self-hosted git repository management system. QQ群:656868
Stars: ✭ 350 (-3.31%)
Mutual labels:  mysql
Nameless
NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.
Stars: ✭ 337 (-6.91%)
Mutual labels:  mysql
Schemalex
Generate difference sql of two mysql schema
Stars: ✭ 356 (-1.66%)
Mutual labels:  mysql
Superboot
随着技术日新月异,新技术新平台不断出现,对现如今的开发人员来说选择快速高效的框架进行项目开发,既能提高产出,又能节约时间。本框架无需开发即可实现服务注册、服务发现、负载均衡、服务网关、配置中心、API管理、分布式事务、支撑平台、集成框架、数据传输加密等功能,是学习SpringCloud整体业务模式的完整示例,并且可以直接用于生产环境
Stars: ✭ 341 (-5.8%)
Mutual labels:  mysql
Dormitorymanager
学生宿舍管理系统(SSM/Layui框架;毕业设计)
Stars: ✭ 346 (-4.42%)
Mutual labels:  mysql
Phper
一个PHPer的升级之路
Stars: ✭ 362 (+0%)
Mutual labels:  mysql
Salamanderwnmp
A beautiful Nginx PHP Mysql environment for windows( windows下用WPF制作的nginx,php,mysql集成环境(免安装))
Stars: ✭ 358 (-1.1%)
Mutual labels:  mysql
Open source bms
Open Source BMS 后台管理系统
Stars: ✭ 351 (-3.04%)
Mutual labels:  mysql

mysqldumpsplitter - MySQL Dump splitter to split / extract databases, tables, list from mysqldump with plenty of more funtionality.

Usage:

Download the utility from website or git repository.


************ Usage ************

sh mysqldumpsplitter.sh --source filename --desc --extract [DB|TABLE|DBTABLES|ALLDBS|ALLTABLES|REGEXP] --match_str string --compression [gzip|pigz|bzip2|none] --decompression [gzip|pigz|bzip2|none] --output_dir [path to output dir] [--config /path/to/config]

Options:

--source: mysqldump filename to process. It could be a compressed or regular file.
--desc: This option will list out all databases and tables.
--extract: Specify what to extract. Possible values DB, TABLE, ALLDBS, ALLTABLES, REGEXP
--match_str: Specify match string for extract command option.
--compression: gzip/pigz/bzip2/none (default: gzip). Extracted file will be of this compression.
--decompression: gzip/pigz/bzip2/none (default: gzip). This will be used against input file.
--output_dir: path to output dir. (default: ./out/)
--config: path to config file. You may use --config option to specify the config file that includes following variables.
	SOURCE=
	EXTRACT=
	COMPRESSION=
	DECOMPRESSION=
	OUTPUT_DIR=
	MATCH_STR=

Ver. 5.0


mysqldumpsplitter recipe:

  1. Extract single database from mysqldump:

sh mysqldumpsplitter.sh --source filename --extract DB --match_str database-name

Above command will create sql for specified database from specified "filename" sql file and store it in compressed format to database-name.sql.gz.

  1. Extract single table from mysqldump:

sh mysqldumpsplitter.sh --source filename --extract TABLE --match_str table-name

Above command will create sql for specified table from specified "filename" mysqldump file and store it in compressed format to database-name.sql.gz.

  1. Extract tables matching regular expression from mysqldump:

sh mysqldumpsplitter.sh --source filename --extract REGEXP --match_str regular-expression

Above command will create sqls for tables matching specified regular expression from specified "filename" mysqldump file and store it in compressed format to individual table-name.sql.gz.

  1. Extract all databases from mysqldump:

sh mysqldumpsplitter.sh --source filename --extract ALLDBS

Above command will extract all databases from specified "filename" mysqldump file and store it in compressed format to individual database-name.sql.gz.

  1. Extract all table from mysqldump:

sh mysqldumpsplitter.sh --source filename --extract ALLTABLES

Above command will extract all tables from specified "filename" mysqldump file and store it in compressed format to individual table-name.sql.gz.

  1. Extract list of tables from mysqldump:

sh mysqldumpsplitter.sh --source filename --extract REGEXP --match_str '(table1|table2|table3)'

Above command will extract tables from the specified "filename" mysqldump file and store them in compressed format to individual table-name.sql.gz.

  1. Extract a database from compressed mysqldump:

sh mysqldumpsplitter.sh --source filename.sql.gz --extract DB --match_str 'dbname' --decompression gzip

Above command will decompress filename.sql.gz using gzip, extract database named "dbname" from "filename.sql.gz" & store it as out/dbname.sql.gz

  1. Extract a database from compressed mysqldump in an uncompressed format:

sh mysqldumpsplitter.sh --source filename.sql.gz --extract DB --match_str 'dbname' --decompression gzip --compression none

Above command will decompress filename.sql.gz using gzip and extract database named "dbname" from "filename.sql.gz" & store it as plain sql out/dbname.sql

  1. Extract alltables from mysqldump in different folder:

sh mysqldumpsplitter.sh --source filename --extract ALLTABLES --output_dir /path/to/extracts/

Above command will extract all tables from specified "filename" mysqldump file and extracts tables in compressed format to individual files, table-name.sql.gz stored under /path/to/extracts/. The script will create the folder /path/to/extracts/ if not exists.

  1. Extract one or more tables from one database in a full-dump:

Consider you have a full dump with multiple databases and you want to extract few tables from one database.

Extract single database:
`sh mysqldumpsplitter.sh --source filename --extract DB --match_str DBNAME --compression none`

Extract all tables
`sh mysqldumpsplitter.sh --source out/DBNAME.sql --extract REGEXP --match_str "(tbl1|tbl2)"`

though we can use another option to do this in single command as follows:

sh mysqldumpsplitter.sh --source filename --extract DBTABLE --match_str "DBNAME.(tbl1|tbl2)" --compression none

Above command will extract both tbl1 and tbl2 from DBNAME database in sql format under folder "out" in current directory.

You can extract single table as follows:

sh mysqldumpsplitter.sh --source filename --extract DBTABLE --match_str "DBNAME.(tbl1)" --compression none

  1. Extract all tables from specific database:

mysqldumpsplitter.sh --source filename --extract DBTABLE --match_str "DBNAME.*" --compression none

Above command will extract all tables from DBNAME database in sql format and store it under "out" directory.

  1. List content of the mysqldump file

mysqldumpsplitter.sh --source filename --desc

Above command will list databases and tables from the dump file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].