Please, be careful: this is beta-version so far and things can change.
Dumps an entire MySQL database to a single *.sql
or *.sql.bz2
file, ignoring contents for specific set of tables.
It's intended to reduce the MySQL dump file size when it's known that some tables have insignificant data, but must
present in the database for normal operation mode.
- Runs
mysqldump
twice using--no-data
or--ignore-table
options to exclude content of specified set of tables, but gets an entire database dump as single file - Supports Bzip2 compression
- Dry-run mode lets you review all the actual commands that would be executed in the normal mode
mysqldump
bzip2
git clone
this repo wherever you want
You can use this script totally for free, or you can appreciate the author for his work and support desire to make new useful projects:
For example, if you want to dump database
with bzip2 compression, but exclude content of tables b_event_log
,
b_event
and b_perf_sql
./bin/mysqltwindump --exclude-content b_event_log \
--exclude-content b_event \
--exclude-content b_perf_sql \
--host "localhost" \
--port "3306" \
--user "user" \
--password "password" \
--database "database" \
--bzip2 \
> "mysql-twin-dump_$(date +%Y-%m-%d_%H-%M).sql.bz2"
Get all possible options and modes
./bin/mysqltwindump --help
None so far.