Tungsten replicator do mysql cluster backup

About Tungsten replicator

Tungsten is a family of open source technologies for database clustering and replication. Tungsten includes replication, management, SQL routing, and proxying that improve database availability, protect data, and raise application throughput.

Download:http://sourceforge.net/projects/tungsten/files/

tungsten replicator is the software for data replication in a component. Adopted in the main from the server to deploy the java process of the binlog on master database to track and update the contents of resolution sent to them from the server, and the java from the server will receive a written update from the database.

Tungsten_replicator

 

Test
Master1
192.168.1.8
Master2
192.168.1.4
Slave
192.168.1.7

Master configuration

 
Tungsten replicator Download compressed package, unzip to a separate directory. Conf directory will be renamed to replicator.properties.mysql the replicator.properties, and in accordance with the following practical situation:

# Master server is the statement of the current model
replicator.role = master
# Services start automatically after the copy
replicator.auto_enable = true
# Specify a unique global id, server name proposed
replicator.source_id = dev08
# Copy the data designated for storage of the database name manually in the mysql database to generate a space and this library will my.cnf by adding binlog-ignore-db parameter in. Default database for the tungsten
replicator.schema = tungsten
# Designated master of ip, this machine is the use of localhost
replicator.thl.remote_uri = thl: //localhost/
# If replicator.schema parameter specifies the database to other name, would be taken into tungsten database name specified.
replicator.thl.url = jdbc: mysql://localhost/tungsten
# Specify the binlog file directory
replicator.extractor.mysql.binlog_dir =/usr/local/mysql/var
# Specify the binlog file name prefix
replicator.extractor.mysql.binlog_file_pattern = mysql-bin
# Replicator procedures specified database user name and password, and in the database to generate the user, the need for super powers.
replicator.thl.user=tungsten
replicator.thl.password=secret
replicator.applier.mysql.host=localhost
replicator.applier.mysql.port=3306
replicator.applier.mysql.user=tungsten
replicator.applier.mysql.password=secret
replicator.extractor.mysql.host=localhost
replicator.extractor.mysql.user=tungsten
replicator.extractor.mysql.password=secret

Upon completion of the use of configuration directory under the bin command to start trepsvc
Trepsvc start
Bin directory with view server state trepctl
Trepctl status
Name
Value

===============================================
System ID
dev08
System Version:
1.0-beta5
System State:
ONLINE:MASTER
System Uptime (S): 282739.972s
State Uptime (S):
282739.351s
Error:
null
Error Exception:
null
Min Seq No:
0
Max Seq No:
179
Monitor Intvl (S): 282740.011
Extr Total:
179
Extr Last Seq No:
179
Extr/Sec:
6.330904427029223E-4
Recv Total:
0
Recv Last Seq No:
-1
Recv Source TS:
null
Recv Target TS:
null
Recv Latency (S):
0.0
Recv/Sec:
0.0
Apply Total:
0
Apply Last Seq No: -1
Apply Source TS:
null
Apply Target TS:
null
Apply Latency (S): 0.0
Apply/Sec:
0.0
State: ONLINE:MASTER
Seqno Range: 0 -> 179
When the state is ONLINE: MASTER note start successfully

Slave configuration

From tow master as a result of the synchronous data, so to extract tungste replicator into two different directory, then start the two directory tungsten replicator process.
And master the basic configuration is the same as the contents of replicator.properties is different from the actual situation in accordance with amendments to the following:

# Statement slave mode the machine is
replicator.role = slave
# Services start automatically after the copy
replicator.auto_enable = true
# Specify a unique global id, slave on two different replicator need id
replicator.source_id = dev071
# Copy the data designated for storage of the library and the library will be in my.cnf by adding binlog-ignore-db parameter in. The need for two different replicator release inventory data, generated in the mysql manual in which two empty Treasury, and in the my.cnf to join two database binlog-ignore-db parameter in
replicator.schema = svnrep
# Rmi ports, two need to specify a different port replicator
replicator.rmi_port = 11000
# Thl ports, two need to specify a different port replicator
replicator.thl.uri = thl:// 0.0.0.0:12112/
# Appointed master of the ip, two replicator need to specify a different master for the replication database.
replicator.thl.remote_uri = thl://192.168.1.4/
# Replicator.schema parameters, will be replaced by the actual svnrep database name.
replicator.thl.url = jdbc: mysql://localhost/svnrep
Other configurations with the same master.

Upon completion of the use of configuration directory under the bin command to start trepsvc
Trepsvc start
Bin directory with view server state trepctl
Trepctl status
Name
Value

===============================================
System ID
dev071
System Version:
1.0-beta5
System State:
ONLINE:SLAVE
System Uptime (S): 6509.149s
State Uptime (S):
6325.891s
Error:
null
Error Exception:
null
Min Seq No:
0
Max Seq No:
5
Monitor Intvl (S): 6509.153
Extr Total:
0
Extr Last Seq No:
-1
Extr/Sec:
0.0
Recv Total:
2
Recv Last Seq No:
5
Recv Source TS:
2009-06-22 15:53:54.581
Recv Target TS:
2009-06-22 15:58:26.343
Recv Latency (S):
271.762
Recv/Sec:
3.072588835840643E-4
Apply Total:
1
Apply Last Seq No: 5
Apply Source TS:
2009-06-22 15:53:54.581
Apply Target TS:
2009-06-22 15:58:26.352
Apply Latency (S): 271.771
Apply/Sec:
1.536292765781721E-4
State: ONLINE:SLAVE
Seqno Range: 0 -> 5
When the state is ONLINE: SLAVE note start successfully

The current version of trepctl command is used by default port 10000, so view the port replicator for the 11,000 state of the need to manually set some system variables
export REPLICATOR_RMI_PORT = 11000
Trepctl can then implement.
Tungsten replicator features

Tungsten replicator is defined as the framework for heterogeneous database replication, enabling different versions, different types of database replication between databases. According to the official description, and now can be the version of mysql pieces, as well as between mysql and oracle database replication, but some functions still can not avoid the restrictions.
Have been testing the software is to be used in place of mysql replication, but the effect of the test is not very good, one million records simultaneously, mysql replication 4 minutes 10 seconds, tungsten replicator 5 minutes and 30 seconds. Copy mode for binlog line support is not very good support for the ddl statement is not very good.
As a result of using tungsten replicator data jdbc operations, some in the database can be jdbc operations are illegal operation that led to the suspension of copying, such as the datetime field to insert a null character. Therefore, if the web application layer is not a java program, then there is a certain risk. Java and the process itself will take some memory, when the database operation to write and update more frequently when not enough memory, master of tungsten because of the insufficient memory error, but will not cause data loss, but will suspend replication. My test server is a 2G memory, innodb_buffer_pool_size for 1G, when I generate one million quantities, when the data will be wrong. tungsten as the default maximum memory 256M, may amend the wrapper.java.maxmemory parameters wrapper.conf to increase the memory limit.
But the software update or quickly, or when testing 1.0.1, testing has been completed after the 1.0.2 update to the. In the software development plan, parallel copy is more of the features people expect.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

No Responses to “Tungsten replicator do mysql cluster backup”

Leave a Reply

Name:
Email:
Website:
Comment:
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>