|
Size: 2550
Comment:
|
← Revision 6 as of 2012-09-24 18:54:47 ⇥
Size: 2946
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
This document describes the ssh/rsync based replication available since [[Solr1.1]] '''This mechanism only works on systems that support removing open hard links'''. /!\ These Scripts were superseded by the [[SolrReplication|ReplicationHandler]] Java implementation of index replication that works over HTTP and was introduced in [[Solr1.4]], and are no longer actively maintained. /!\ |
This document describes the ssh/rsync based replication available since Solr1.1 This mechanism only works on systems that support removing open hard links.
These Scripts were superseded by the ReplicationHandler Java implementation of index replication that works over HTTP and was introduced in Solr1.4, and are no longer actively maintained.
Contents
Distribution Status/Stats
The file solr/logs/snappuller.status on the slave Solr server contains the status and stats of the current or most recent invocation of snappuller.
A copy of this file is scp back to the master Solr server whenever it changes. The directory on the master Solr server containing the status files of all the slaves is defined by the environment variable master_status_dir in the configuration file solr/conf/scripts.conf or specified in the snappuller command line option -S. The name of the file itself contains the uname of the slave as the suffix (for example, snappuller.status.machine.domain.com).
Here is a summary of what the snappuller status file contains for various situation:
no snapshot available on master server in the data directory
no snapshot available on master <host> in directory <dir>
rsync in progress
rsync of snapshot.20050511114052 started:20050511-144303
rsync finished successfully
rsync of snapshot.20050511114052 started:20050511-144303 ended:20050511-144312 rsync-elapsed:9
rsync failed
rsync of snapshot.20050511114052 started:20050511-144353 failed:20050511-144353
script terminated by SIGINT or SIGTERM
rsync of snapshot.20050511114052 started:20050511-144322 aborted:20050511-144322
The script traps SIGINT and SIGTERM and remove the snapshot being pulled so in most cases there should not be any partial snapshot on the slave.
Snapshot In Use
The file solr/logs/snapshot.current on the slave Solr server contains the name of the snapshot being used as the live index currently. Name of snapshot is in the following format:
snapshot.yyyymmddHHMMSS
where yyyymmddHHMMSS is the timestamp of when the snapshot was taken.
The name of the snapshot corresponds to the name of the directory holding all the segments.
A copy of this file is scp back to the master Solr server whenever it changes. The directory on the master Solr server containing the status files of all the slaves is defined by the environment variable master_status_dir in the configuration file solr/conf/scripts.conf or specified in the snappuller command line option -S. The name of the file itself contains the uname of the slave as the suffix (for example, snapshot.current.machine.domain.com).