Académique Documents
Professionnel Documents
Culture Documents
Table of Contents
1. Introduction ............................................................................................................................................ 1 2. Product Installation and Configuration ..................................................................................................... 2 2.1. Prerequisites ............................................................................................................................... 2 2.2. Software Download ..................................................................................................................... 2 2.3. Setting Up Master/Slave Replication ............................................................................................. 2 2.3.1. Master Replicator Configuration ......................................................................................... 2 2.3.2. Testing Replication ............................................................................................................ 3 3. Tungsten Configuration Procedures ......................................................................................................... 5 3.1. tungsten-installer ......................................................................................................................... 5 3.1.1. Getting Help ..................................................................................................................... 5 3.1.2. Replicator Topologies ........................................................................................................ 5 3.1.3. Service Name ................................................................................................................... 6 3.1.4. Home Directory ................................................................................................................ 6 3.1.5. Database Login and Passwords ........................................................................................ 6 3.1.6. Replicator Start-Up ........................................................................................................... 6 3.1.7. Installation Checks ............................................................................................................ 6 3.1.8. Advanced Property Settings .............................................................................................. 6 3.2. configure ..................................................................................................................................... 7 3.2.1. Getting Help ..................................................................................................................... 7 3.2.2. Cluster Hosts ................................................................................................................... 7 3.2.3. Home Directory ................................................................................................................ 7 3.2.4. Replicator Start-Up ........................................................................................................... 7 3.2.5. Installation Checks ............................................................................................................ 8 3.3. configure-service ......................................................................................................................... 8 3.3.1. Getting Help ..................................................................................................................... 8 3.3.2. Replicator Service Role ..................................................................................................... 8 3.3.3. Service Name ................................................................................................................... 8 3.3.4. Service Type .................................................................................................................... 8 3.3.5. Release Directory ............................................................................................................. 9 4. Configuring Specialized Replication Topologies ...................................................................................... 10 4.1. MySQL Slave Replacement with Parallel Replication ................................................................... 10 4.1.1. MySQL Replication Setup ............................................................................................... 10 4.1.2. Tungsten Configuration and Slave Takeover ..................................................................... 12 4.1.3. Re-enabling MySQL Slave SQL Thread ........................................................................... 12 4.2. Setting up Bi-Directional Replication ........................................................................................... 13 4.2.1. Unpack software ............................................................................................................. 14 4.2.2. First Master Replicator Configuration ............................................................................... 14 4.2.3. Second Master + Slave Replicator Configuration .............................................................. 14 4.2.4. Remote Slave Service Configuration ................................................................................ 14 4.3. Setting up MySQL to PostgreSQL Replication ............................................................................. 15 5. Host Prerequisites ................................................................................................................................ 16 5.1. Tungsten Login .......................................................................................................................... 16 5.1.1. Configuring Remote Host Access for Tungsten Login ........................................................ 16 5.1.2. Configuring Remote Host Access for PostgreSQL Login .................................................... 17 5.2. Operating System Prerequisites ................................................................................................. 18 5.2.1. Notes on Operating System Prerequisites ........................................................................ 18 5.2.2. Linux Prerequisites ......................................................................................................... 18 5.2.3. Mac OS X Prerequisites .................................................................................................. 18
Tungsten Replicator Installation Guide 5.2.4. Solaris Prerequisites ....................................................................................................... 5.3. Java Virtual Machine ................................................................................................................. 5.4. Sudo Prerequisites .................................................................................................................... 5.4.1. Sudo Configuration Hints ................................................................................................. 5.5. Network Prerequisites ................................................................................................................ 5.6. MySQL Database Prerequisites .................................................................................................. 5.6.1. Configuring MySQL System Variables for Tungsten .......................................................... 5.6.2. Configuring XtraBackup ................................................................................................... 5.7. PostgreSQL Database Prerequisites ........................................................................................... 5.7.1. Configuring PostgreSQL Server Account Access .............................................................. 5.7.2. Preparing the Archive Folder ........................................................................................... 5.7.3. Configuring Primary and Standby Servers ........................................................................ 5.8. Oracle Database Prerequisites ................................................................................................... 5.9. Backup Prerequisites ................................................................................................................. 5.9.1. Backup Storage .............................................................................................................. 5.9.2. Backup Methods ............................................................................................................. 6. Detailed Configuration .......................................................................................................................... 6.1. Message Log Configuration ........................................................................................................ 6.1.1. Replicator Logs ............................................................................................................... 6.1.2. Introducing Log4j ............................................................................................................ 6.1.3. Log4j Configuration Settings ............................................................................................ 6.2. Java Service Wrapper Configuration ........................................................................................... 6.2.1. Introducing Service Wrapper ........................................................................................... 6.2.2. Wrapper Configuration Settings ....................................................................................... 6.3. Network Configuration ................................................................................................................ 6.3.1. Network Port Access ....................................................................................................... 6.4. JMX Configuration ..................................................................................................................... 6.4.1. Introducing JMX .............................................................................................................. 6.4.2. JMX Configuration Settings ............................................................................................. 6.4.3. JMX on NAT-enabled hosts ............................................................................................. 6.5. Backup Configuration ................................................................................................................. 6.5.1. Xtrabackup ..................................................................................................................... 6.5.2. Mysqldump ..................................................................................................................... 6.5.3. Custom Backup Methods ................................................................................................ 6.5.4. Automatic Backup ........................................................................................................... 6.5.5. Automatic Restore .......................................................................................................... 6.5.6. Configuring backup after installation ................................................................................. 19 19 20 20 21 22 23 23 24 25 26 26 27 27 27 27 29 29 29 29 29 30 30 30 30 30 31 31 31 31 31 31 32 32 32 32 33
Introduction
Chapter 1. Introduction
This document contains the installation procedure for Tungsten 2.0.4. The procedure describes how to install Tungsten Replicator in the following configurations: Basic master/slave MySQL native slave replacement with parallel replication Multi-master replication There are many sources of information about Tungsten Replicator besides the product documentation. You can find useful tips and tutorials in the following locations. Tungsten Replicator project home at http://code.google.com/p/tungsten-replicator. This contains information about location of builds, mailing lists, IRC channels, and issue tracking. Blog articles. Two blogs that specialize in replication topics and especially Tungsten are the Scale-Out Blog [http://scale-out-blog/blogspot.com] and The Datacharmer [http://datacharmer.blogspot.com]. Webinars and conference presentations. Check the Continuent website at http://www.continuent.com for more information.
Note
Tungsten installation changed radically between version 2.0.3 and 2.0.4. Common installation patterns are now single-line commands. The pre-2.0.4 installations are deprecated and will be removed in the next release.
2.1. Prerequisites
Before installing, you must meet all prerequisites for Tungsten installation as documented in Chapter 5, Host Prerequisites. The Tungsten installer script checks these and other prerequisites and will fail if they are not met.
The master database replication service operates in the "master" role, while the slave database replication service operates in the "slave" role. In this topology, replicator processes may run on the same host as the MySQL DBMS or remotely on separate hosts.
tar -xvzf tungsten-replicator-2.0.4.tar.gz cd tungsten-replicator-2.0.4 2. Execute the following command to set up master/slave replication. It will copy the release to the home directory you select, configure the "logos" replicator service, and start the replicator. You must supply the correct login and password for the MySQL DBMS. tools/tungsten-installer --master-slave --master-host=logos1 \ --datasource-user=tungsten \ --datasource-password=secret \ --service-name=logos \ --home-directory=/opt/continuent \ --cluster-hosts=logos1,logos2 \ --start-and-report \
2. 3.
Run trepctl heartbeat on the master. Run trepctl services again on each replicator and confirm the sequence number has advanced by at least one. $ trepctl -host logos1 services Processing services command... NAME VALUE -------appliedLastSeqno: 1 appliedLatency : 0.057 role : master serviceName : logos serviceType : local started : true state : ONLINE Finished services command... $ trepctl -host logos2 services Processing services command... NAME VALUE -------appliedLastSeqno: 1 appliedLatency : 0.79 role : slave serviceName : logos serviceType : local started : true state : ONLINE Finished services command...
Warning
The configure and configure-service scripts located in the root Tungsten directory are now deprecated. They will be removed in a future build. We recommend at all users upgrade to the new installs as they are more powerful and much easier to use.
3.1. tungsten-installer
The tungsten-installer script installs common replication topologies such as master/slave and direct configurations in a single command. The tungsten-installer script copies code from the directory in which you unpack the Tungsten tar ball to the final release directory. It can copy and configure across multiple hosts. The following command shows a typical example of tungsten-installer usage. tools/tungsten-installer --master-slave --service-name=logos \ --master-host=logos1 \ --cluster-hosts=logos1,logos2 \ --home-directory=/opt/tungsten \ --datasource-user=tungsten \ --datasource-password=secret \ --start-and-report \
The following subsections provide tips on commonly used arguments for replicator installation.
Tungsten Configuration Procedures Direct topology installs a single replicator that replicates directly from a master to a slave. You should list a single host in the --cluster-hosts option.
Tungsten Configuration Procedures Finally, you can also override specific properties in the replication service properties file using the -properties=name=value option, as shown in the following example. tools/tungsten-installer --master-slave -a \ ... \ --property=replicator.filter.shardfilter.unknownShardPolicy=error \ --start-and-report
3.2. configure
The configure performs base replication setup and release directory configuration. Among other things it generates a file named tungsten.cfg that contains information about hosts as well as replicator process settings. This file is used as a basis for configuring replication services using configure-service.
Caution
The tungsten.cfg format is based on JSON and is completely different from Tungsten 2.0.3 and earlier configuration files. The following example shows an example of setting up replicator code and processes on two hosts named logos1 and logos2. tools/configure --home-directory=/opt/continuent \ --cluster-hosts=logos1,logos2 \ --start-and-report=true The following subsections provide tips on commonly used arguments for configure. Generally speaking options are consistent with those used by tungsten-installer.
3.3. configure-service
The configure-service script configures an individual replication service. Tungsten permits multiple replication services to run inside a single replicator process. You must first have run either tungsten-installer or configure to set up the tungsten.cfg file. configure-service usage is similar to tungsten-installer, with many of the same options. The following example shows how to define an extra slave service for multi-master replication. tools/configure-service -C --role=slave --host=logos2 \ --service-name=logos1 \ --master-host=logos1 \ --local-service-name=logos2 \ --release-directory=/opt/continuent/tungsten --service-type=remote --allow-bidi-unsafe=true --svc-start The following subsections provide tips on commonly used arguments for service configuration.
Note
To configure replication services effectively you will need to understand exactly how replication service properties files work. There are many options and not all of them play well together. Look at the Tungsten Replicator Guide and/or existing service properties files for hints on correct settings.
Tungsten Configuration Procedures Remote services are used to transfer data from one master to another in multi-master replication. Remote services are normally slaves in the current replicator implementation. There may be multiple remote services per replicator process. You can configure a remote service using the --service-type=remote option. When you do so you must also provide the name of the master service using the --local-service-name option.
In this topology, a Tungsten replicator takes over the function of the MySQL IO and SQL threads. This enables use of Tungsten parallel apply, which can speed up I/O bound MySQL slaves considerably. The replicator uses a direct pipeline that logs events and then applies them to the slave.
[mysqld] server-id=10 log-bin=/usr/local/mysql-5.1/data/mysql-bin binlog_format=statement 2. Restart mysqld so that any changed my.cnf values take effect. If you have not changed values, skip this step. $ sudo service mysql restart
Note
Depending on your OS and distribution you may need to use sudo restart mysql or /etc/init.d/mysqld restart. 3. Create a replication account if it does not already exist. The account must have REPLICATION SLAVE privilege at a minimum. The user name and password of this account will be used to configure the slave. mysql> GRANT REPLICATION SLAVE ON *.* to tungsten@'%' IDENTIFIED by 'secret'; 4. Execute a RESET MASTER command to delete old logs and reset binary logging. mysql> RESET MASTER; Query OK, 0 rows affected (0.74 sec) On the MySQL slave host, perform the steps shown below. 1. Edit my.cnf and set a unique value for server-id. Note also the location of the data directory, as this is where relay logs are written. [mysqld] server-id=20 2. Restart the slave mysqld so that any changed my.cnf values take effect. If you have not changed values, skip this step. sudo service mysql restart 3. Login to the MySQL server and issue a CHANGE MASTER command to enable built-in MySQL replication. This command uses the user name, password, and log file data collected on the master. Then start the slave IO and SQL threads.
mysql> CHANGE MASTER TO master_host='master_hostname', master_port=3306, master_user='tungsten', master_password='secret' mysql> START SLAVE 4. Confirm that replication is working properly by creating a table on the master and ensuring that it replicates through to the slave.
Warning
Parallel replication depends on workload being distributed across independent shards. If you are unsure whether your applications meet this requirement, omit the --channels option to use a single apply thread.
$ replicator stop 2. Re-enable MySQL replication. mysql> start slave; 3. Confirm that MySQL native replication is working correctly by entering one or more transactions on the master and ensuring that they replicate correctly through to the slave.
Any update on a master will replicate to that master's slaves, including the remote services. So, for example, an update on the DBMS attached to Replicator A will be picked up by Replicator A's master service logos1. The remote slave service logos1 will receive the update and apply a logged update to the DBMS attached to Replicator B. This update will in turn be read from the binlog by the logos2 master service and hence replicated to the DBMS attached to Replicator C.
Warning
In this example there are two distinct replication services. The replication service should be named the same on the master and the slave to work properly. Service names must also be unique within each instance of Tungsten Replicator and each database server.
--service-name=logos2 \ --service-type=remote \ --local-service-name=logos1 \ --datasource=logos1 \ --release-directory=/opt/continuent/tungsten \ --allow-bidi-unsafe=true \ --svc-start Now create a remote slave replication service on logos2 to transfer data from the master on logos1. tools/configure-service -C --host=logos2 \ --role=slave \ --master-host=logos1 \ --service-name=logos1 \ --service-type=remote \ --local-service-name=logos2 \ --datasource=logos2 \ --release-directory=/opt/continuent/tungsten \ --allow-bidi-unsafe=true \ --svc-start Once these commands complete bi-directional replication is set up and working. Try entering transactions on both masters to confirm that data move in both directions as well as onto the the slave on logos3.
Host Prerequisites
Ensure release directo- Ensure locations like /opt/ ry locations are writable. continuent exist and are writable by the tungsten account.
Note
File and directory names may vary according to your operating system and the type of key generated. 1. Use the ssh-keygen program to generate a key. Either omit a passphrase, or use ssh-agent when installing. Here is an example of use. pasayten:~/.ssh # ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/opt/tungsten/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /opt/tungsten/.ssh/id_rsa. Your public key has been saved in /opt/tungsten/.ssh/id_rsa.pub. The key fingerprint is: 4c:cf:40:4e:1e:a3:be:91:11:f1:9a:48:4a:5d:f8:33 tungsten@pasayten 2. Copy the private key id_rsa to ~tungsten/.ssh for each host that will participate in the cluster. 3. Similarly add the public key to the authorized_hosts file using a command like the following: cat id_rsa.pub >> ~/.ssh/authorized_keys 16 Tungsten version 2.0.4
Host Prerequisites 4. Ensure the .ssh directory and files within it are readable only to the 'tungsten' account. chmod 700 ~/.ssh;chmod 600 ~/.ssh/* 5. Test ssh access by logging in between hosts. You may need to do this once for each host-to-host combination, including the local hostname, to eliminate prompts like the following:
$ ssh pasayten The authenticity of host 'pasayten (172.16.238.128)' can't be established. RSA key fingerprint is 16:54:e3:e4:e8:88:45:fc:62:07:5e:69:59:86:4c:c4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'pasayten,172.16.238.128' (RSA) to the list of known hosts.
Note
File and directory names may vary according to your operating system and the type of key generated. 1. Use the ssh-keygen program to generate a key. Do not put a passphrase on the key. Here is an example of use. pasayten:~/.ssh # ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/var/lib/pgsql/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /var/lib/pgsql/.ssh/id_rsa. Your public key has been saved in /var/lib/pgsql/.ssh/id_rsa.pub. The key fingerprint is: 4c:cf:40:4e:1e:a3:be:91:11:f1:9a:48:4a:5d:f8:33 postgres@pasayten 2. Copy the private key id_rsa to ~postgres/.ssh for each host that will participate in the cluster. 3. Similarly add the public key to the authorized_hosts file using a command like the following: cat id_rsa.pub >> ~/.ssh/authorized_keys 4. Ensure the .ssh directory and files within it are readable only to the 'postgres' account. chmod 700 ~/.ssh;chmod 600 ~/.ssh/* 5. Test ssh access by logging in between hosts. You may need to do this once for each host-to-host combination, including the local hostname, to eliminate prompts like the following:
$ ssh pasayten The authenticity of host 'pasayten (172.16.238.128)' can't be established. 17 Tungsten version 2.0.4
Host Prerequisites
RSA key fingerprint is 16:54:e3:e4:e8:88:45:fc:62:07:5e:69:59:86:4c:c4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'pasayten,172.16.238.128' (RSA) to the list of known hosts.
Host Prerequisites
Host Prerequisites
Important
Many Linux distributions ship non-Sun Java versions such as GNU Java. These versions use different command line flags and different libraries from the Sun JDK. We recommend users remove non-Sun versions if present as they may cause Tungsten processes to fail at start-up or otherwise misbehave.
Warning
Do not mix Java versions. All hosts running Tungsten must run Java 6. Running a mix of versions may result in runtime errors.
Note
Ensure sudo is config- sudo -l ured for non-root accounts and does not require a password. Allow batch sudo commands from ssh. ssh localhost sudo -l requiretty is unset.
Host Prerequisites
#Defaults requiretty Defaults visiblepw ... ## For MySQL users only use one of these two options ## Allow tungsten to run any command tungsten ALL=NOPASSWD: ALL For PostgreSQL users:
# Batch sudo commands do not work if requiretty is set. #Defaults requiretty Defaults visiblepw ... ## For PostgreSQL users ## Allow postgres to run any command postgres pasayten=(root) NOPASSWD: ALL
Ensure that all other host names in cluster resolve to their IP addresses from this host. Check visibility of TCP/ IP ports.
hostname --ip-address
Check visibility of ports from another host. You can use telnet hostname port to verify accessibility. Here are the key ports that must be open. 2112 - Port for replication THL. Must be open on any host that runs a replicator. 10000 - Port for Replicator JMX connections. Must be
Host Prerequisites
Description
Check (commands in this font) open to enable remote access to the replicator.
Expected Result
Warning
Tungsten is highly dependent on correct and consistent resolution of host names to IP addresses. Inconsistencies due to different /etc/hosts files or other name resolution issues are one of the most common causes of cluster failures. Always check host name resolution very carefully on each new host and recheck if you encounter problems in operation.
Ensure recommended Review settings in my.cnf and MySQL parameters are restart MySQL if any changes set. are made.
Settings must match or exceed required values shown in Section 5.6.1, Configuring MySQL System Variables for Tungsten.
Download the latls -al /opt/mysql/mysql-conThe JDBC jar file is readable by the tungsten usest MySQL JDBC nector-java-5.1.13/mysql-con- er. driver from http:// nector-java-5.1.13-bin.jar www.mysql.com/downloads/connector/j/ to /opt/mysql. This is required only if you need to replicate data to MySQL 4.1. Allow the tungsten us- ls -al /var/lib/mysql/ er to read the binary log files. Add the tungsten user to the mysql group in /etc/group and ensure MySQL binlogs are group readable. Check TCP/IP login of account used for replication. mysql -utungsten -h{hostname} --port=3306 -psecret The tungsten user can read binary log files from the MySQL directory.
Host Prerequisites
Description Check that replicator login can create a database. Check TCP/IP login of client accounts used by applications. Check ability to restart database. This is required if you use a backup method that needs to restart the DBMS.
Check (commands in this font) mysqladmin -utungsten -h{hostname} --port=3306 -psecret create test
[sudo] /etc/init.d/mysqld [start Must be able to execute commands using sudo | stop] for non-root accounts. Root does not require sudo. The boot script name may vary according to your operating system and version of MySQL. See the sudo configuration instructions in Section 5.4, Sudo Prerequisites for hints on setting up sudo.
Note
Whenever you make changes to my.cnf values you should restart MySQL and check settings using the SHOW VARIABLES command to ensure they take effect.
Host Prerequisites XtraBackup is not bundled with Tungsten Enterprise but the latest version can be downloaded from http:// www.percona.com/downloads/XtraBackup/LATEST/.
Warning
Tungsten for PostgreSQL accounts MUST use the PostgreSQL system account to run Tungsten. For standard PostgreSQL installations, you must perform the following checks while logged in as the 'postgres' user on the operating system.
Confirm presence of pg_standby --version pg_standby executable. Check TCP/IP access psql -hlocal_host_name to local Postgres server using PostgreSQL system account without a password. Check TCP/IP access psql -hmaster_host to the master Postgres server using PostgreSQL system account without a password. Check ability to restart database [sudo] /etc/init.d/postgresql [start | stop]
Must be able to login to master host without a password. See the note on configuring account access below if this check does not succeed.
PostgreSQL login must be able to restart the database. See sudo configuration instructions in Section 5.4, Sudo Prerequisites to set up sudo access if this test does not work. The database start script name and location may vary according to your operating system and version of PostgreSQL.
Host Prerequisites
Description Check ability to ssh to other servers in the cluster without a password. Do this for each server that participates in the cluster.
Expected Result Command must show files on the remote host without prompting for a password or host key authentication. If you do not have certificates configured see the note below on host access.
# "local" is for Unix domain socket connections only local all all # IPv4 local connections: host all all 127.0.0.1/32 # TCP/IP connections host all all 172.16.238.1/24
Note
Whenever you make changes to the pg_hba.conf file you should restart the PostgreSQL server and double check settings to ensure they work correctly. In cases where both local and remote access are required, we recommend using a .pgpass file, which contains passwords to be used for logins. The following instructions describe how to create a .pgpass file for the 'postgres' account. 1. While logged in as 'postgres', edit file .pgpass in the home directory using a command like the following: vi ~/.pgpass 2. Add a line for the 'postgres' account like the following example, where 'secret' is the password. *:*:*:postgres:secret 3. Ensure the file is readable only for the 'postgres' login using the following chmod command. chmod 600 ~/.pgpass If Streaming Replication is used, pg_hba.conf must specify a connection for replication explicitly (it is not considered a part of option all). For example: 25 Tungsten version 2.0.4
Host Prerequisites
host all all 172.16.210.0/24 md5 host replication all 172.16.210.0/24 md5 Switch and failover will not work unless you enable connections for replication on all your PostgreSQL servers.
Note
Tungsten relies on the psql console command. Tungsten does not specify a password to this command as a parameter. Instead, it relies on you to preconfigure it in the .pgpass file. Thus, if the postgres user has a password, define it in the .pgpass file and check whether a plain psql call can connect to the database.
Note
In the case of a lagging slave, the master's archive folder (to be more specific, the outbox folder inside of it) will accumulate WAL files, which are waiting to be sent out to the lagging node. Depending on the lag, the archive folder can drastically increase in size. Slaves should not lag in a healthy cluster slaves, but be prepared for a corner case like this by providing a couple of gigabytes of extra disk space for the archive folder. In the case of an unseen noticeable slave lag, troubleshoot and solve the issue. For more information, see chapter How Tungsten Replicator Implements PostgreSQL WAL Shipping in Tungsten Replicator Guide.
Host Prerequisites servers at the same release level as much as possible. When updating to a new minor release, the safest policy is to update the standby servers first - a new minor release is more likely to be able to read WAL files from a previous minor release than vice versa.
Check database login of sqlplus tungsten_alpha/ account used for repli- secret@ORCL cation.
Note
Backup method names are lower case. 27 Tungsten version 2.0.4
Host Prerequisites
5.9.2.1. XtraBackup
The XtraBackup utility creates a consistent backup of the database without blocking write access for your application or the replication process. It is distributed by Percona at http://www.percona.com/software/percona-xtrabackup/ for multiple platforms. XtraBackup outputs a MySQL data directory that is ready for operation. During the restore process you will not need to wait for a SQL script to load when restoring a backup. In order to use XtraBackup, you must install the XtraBackup package on each server and ensure that the tungsten user has full sudo access.
5.9.2.2. Mysqldump
Mysqldump is supported by default with any MySQL installation. Mysqldump creates a SQL script that may be used to restore all data on a new server. Depending on your MySQL version, the Mysqldump script may require you to take the datasource offline prior to running the backup process. Mysqldump will run the SQL script during the restore process and rebuild all databases from the original database server. For large datasets this time can be extensive, but for small datasets it might be faster than XtraBackup.
Note
Mysqldump does not drop any databases that are unique to the target server during the restore process. This can be either a benefit or a risk depending on your installation so this should be considered when you are deciding which option to use.
5.9.2.3. PG Dump
PG dump is supported by default with any Postgresql installation. PG dump creates a SQL script that may be used to restore all data on a new server. PG dump will run the SQL script during the restore process and rebuild all databases from the original database server.
Detailed Configuration
Detailed Configuration
Note
Changing Log4j settings only affects the service whose log4j.properties you alter. Other services are not affected.
Warning
Debug logging generates voluminous output and slows replication. It should not be enabled on production systems unless required to diagnose problems. For best results, enable logging on specific classes or packages rather than all replicator code.
Note
Some ports are particular to MySQL or PostgreSQL and are so noted. Ports in general are default values; actual values may differ for particular installations. 22 - Default port for ssh and rsync access. Tungsten requires this port to manage PostgreSQL warm standby clusters. 2112 - Default port for master Tungsten Replicator to accept client connections. This must be open for any host that runs a replicator that will act as a master.
Detailed Configuration This port is not currently used for PostgreSQL clustering. 3306 - Default port for MySQL listener. Tungsten itself does not require this port to be open for management reasons but it must be open for applications to connect. 5432 - Default port for PostgreSQL listener. Tungsten requires remote access to this port in order to run backups in PostgreSQL clusters. It must also be open for applications to connect.
Detailed Configuration
6.5.2. Mysqldump
Depending on your version of MySQL, you may have the option of using Mysqldump without having to take the datasource offline. When the configure script is complete, open the tungsten-replicator/conf/ replicator.properties file and review the options that are set for the Mysqldump command. You can find them by searching for the replicator.backup.agent.mysqldump.mysqldumpOptions setting.
Tip
Any line that ends with \ should be joined with the line following it.
Detailed Configuration
replicator.auto_provision=true The replicator will execute a restore the next time it replicator.auto_provision setting will be changed to false. is started. Once complete, the