• Stars
    star
    100
  • Rank 339,342 (Top 7 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 11 years ago
  • Updated about 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MySQL Dump Splitter

NAME

MySQL Database Dump Splitter v0.0.1

AUTHOR

Pavel Tsakalidis [ http://pavel.gr | [email protected] ]

DESCRIPTION

This script breaks down a mysqldump file into one-file-per-table.

USAGE

--in [sql dump] --out [output folder] --force --postfix-time "d-m-Y" --postfix-name [some text] --ignore [ignore-table1,ignore-table2,...] --only [export-table1,export-table2,...] --list

--in            MySQL dump file.
--out           Output folder to store individual sql files.
--force         If --out directory does not exist, create it.
--postfix-time  PHP date() format string to be appended to table filename.
--postfix-name  Any text you want to be appended to table filename.
--ignore        Any tables you want to ignore, comma separated.
--only          Specific tables you want to export. Overrides --ignore option.
--list          Only list tables. Will ignore every option except --in.

EXAMPLES

php dbsplit.php --in /tmp/data.sql --out /tmp/tables --force --only table1,table2
php dbsplit.php --in /tmp/data.sql --list
php dbsplit.php --in /tmp/data.sql --out /tmp/tables --postfix-time "d-m-Y_H-i" --postfix-text myexporttext