There are two eXist-db servers. One is master and one is slave. I know we can replicate the content using ActiveMQ when they are running in the same time(I made this work). But I want to know is there a way to replicate the content manually? Like synchronizing content from A server when B server starts. Actually, they are the same folder in two servers. collection.xconf as below.
<collection xmlns="http://exist-db.org/collection-config/1.0">
<triggers>
<trigger class="org.exist.jms.replication.publish.ReplicationTrigger">
<!--
Class name of the initial context provider, default value
for ActiveMQ
see javax.naming.Context#INITIAL_CONTEXT_FACTORY
-->
<parameter name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
<!--
URL of the message broker, default value for ActiveMQ
see javax.naming.Context#PROVIDER_URL
-->
<parameter name="java.naming.provider.url" value="tcp://localhost:61616"/>
<!--
Lookup connection factory
see javax.naming.InitialContext#lookup(String)
-->
<parameter name="connection-factory" value="ConnectionFactory"/>
<!--
Lookup destination (topic)
see javax.naming.InitialContext#lookup(String)
-->
<parameter name="destination" value="dynamicTopics/eXistdb-replication-example"/>
</trigger>
<trigger event="update" class="org.exist.collections.triggers.XQueryTrigger">
<parameter name="url" value="xmldb:exist:///db/triggerUpdate.xql"/>
</trigger>
</triggers>
</collection>