Mon Nov 12 03:30:00 PST 2007
- Previous message: [Slony1-general] Windows as master, Linux as slave
- Next message: [Slony1-general] "resume" replication without truncating the tables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello List, I have a few question on the method of starting/stopping/resuming replications. I have a replication, which is running at the moment. The steps I took: 1. Created the database on the slave host. 2. Copied the schema from the original. 3. Created the plpgsql language on the slave db. 4. defined the nodes with these scripts: # Cluster internal ID cluster name = $CLUSTER; # Connection data node 1 admin conninfo = 'dbname=$DBNAME1 host=$HOST1 user=$SLONY_USER'; node 2 admin conninfo = 'dbname=$DBNAME2 host=$HOST2 user=$SLONY_USER'; init cluster ( id = 1, comment = 'Node 1' ); create set ( id = 1, origin = 1, comment = 'All tables' ); *snip* table definitions store node ( id = 2, comment = 'Node 2' ); store path ( server = 1, client = 2, conninfo = 'dbname=$DBNAME1 host=$HOST1 user=$SLONY_USER'); store path ( server = 2, client = 1, conninfo = 'dbname=$DBNAME2 host=$HOST2 user=$SLONY_USER'); store listen ( origin = 1, provider = 1, receiver = 2 ); store listen ( origin = 2, provider = 2, receiver = 1 ); 5. Started the slon on both hosts: master: slon $CLUSTERNAME "dbname=$MASTER_DATABASENAME user=$MASTER_SLON_USER" slave: slon $CLUSTERNAME "dbanme=$SLAVE_DATABASENAME user=$SLAVE_SLONY_USER" 6. Run my start_slony_replication.sh which does the following cluster name = $CLUSTER; node 1 admin conninfo = 'dbname=$DBNAME1 host=$HOST1 user=$SLONY_USER'; node 2 admin conninfo = 'dbname=$DBNAME2 host=$HOST2 user=$SLONY_USER'; subscribe set ( id = 1, provider = 1, receiver = 2, forward = no); At this point, the tables are truncated on the slave machine. Even if the two database is synced. So if I run this script to stop the replication cluster name = $CLUSTER; node 1 admin conninfo = 'dbname=$DBNAME1 host=$HOST1 user=$SLONY_USER'; node 2 admin conninfo = 'dbname=$DBNAME2 host=$HOST2 user=$SLONY_USER'; unsubscribe set ( id = 1, receiver = 2 ); and start replication again mentioned in point 6. then all of my tables will be truncated. I'd like to awoid this truncate process. I want to move my server to another place, so I have to stop the replication itself for a few hours. But the size of the database is greater than 60GB and it takes too much time to sync again from scratch via pppoe connection and does not make sense. Is it possible to make such a "resume" replication without deleting all of my data on the slave machine? I want to copy only the "newly changed data between the stop-restart time interval.". Or do I have to use another tool/application which is out of my sight? Thanks in advance, any comments are welcome. -- Adam PAPAI D i g i t a l Influence http://www.digitalinfluence.hu E-mail: wooh at wooh.hu Phone: +36 30 33-55-735 (Hungary)
- Previous message: [Slony1-general] Windows as master, Linux as slave
- Next message: [Slony1-general] "resume" replication without truncating the tables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list