~flytox/mydumper/mydumper.tableslist

« back to all changes in this revision

Viewing changes to README

  • Committer: Domas Mituzas
  • Date: 2009-02-20 21:56:21 UTC
  • Revision ID: domas.mituzas@gmail.com-20090220215621-sjqbgfz4ai29bgkq
add README

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
== What is mydumper? Why? ==
 
2
 
 
3
* Parallelism (hence, speed) and performance (avoids expensive character set conversion routines, efficient code overall)
 
4
* Easier to manage output (separate files for tables, dump metadata, etc, easy to view/parse data)
 
5
* Consistency - maintains snapshot across all threads, provides accurate master and slave log positions, etc
 
6
* Manageability - supports PCRE for specifying database and tables inclusions and exclusions
 
7
 
 
8
It does not support schema dumping and leaves that to 'mysqldump --no-data'
 
9
 
 
10
== How to build it? ==
 
11
 
 
12
Run:
 
13
 make
 
14
 
 
15
One needs to install development versions of required libaries (MySQL, GLib, ZLib, PCRE):
 
16
 
 
17
* Ubuntu or Debian: apt-get install libglib2.0-dev libmysqlclient15-dev zlib1g-dev libpcre3-dev
 
18
* Fedora, RedHat and CentOS: yum install glib2-devel mysql-devel zlib-devel pcre-devel
 
19
* MacOSX: port install glib2 mysql5 pcre
 
20
 
 
21
One has to make sure, that pkg-config, mysql_config, pcre-config are all in $PATH
 
22
 
 
23
== How does consistent snapshot work? ==
 
24
 
 
25
This is all done following best MySQL practices and traditions:
 
26
 
 
27
* Global write lock is acquired ("FLUSH TABLES WITH READ LOCK")
 
28
* Various metadata is read ("SHOW SLAVE STATUS","SHOW MASTER STATUS")
 
29
* Other threads connect and establish snapshots ("START TRANSACTION WITH CONSISTENT SNAPSHOT")
 
30
** On pre-4.1.8 it creates dummy InnoDB table, and reads from it.
 
31
* Once all worker threads announce the snapshot establishment, master executes "UNLOCK TABLES" and starts queueing jobs.
 
32
 
 
33
This for now does not provide consistent snapshots for non-transactional engines - support for that is expected in 0.2 :)
 
34
 
 
35
== How to exclude (or include) databases? ==
 
36
 
 
37
Once can use --regex functionality, for example not to dump mysql and test databases:
 
38
 
 
39
 mydumper --regex '^(?!(mysql|test))'
 
40
 
 
41
Of course, regex functionality can be used to describe pretty much any list of tables.
 
42
 
 
43
== How to exclude MERGE or Federated tables ==
 
44
 
 
45
Use same --regex exclusion syntax. Again, engine-specific behaviors are targetted for 0.2