You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2006/04/06 22:53:30 UTC

[Solr Wiki] Update of "SolrCollectionDistributionScripts" by BillAu

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by BillAu:
http://wiki.apache.org/solr/SolrCollectionDistributionScripts

New page:
[[TableOfContents]]

== snapshooter ==

   {{{
usage: snapshooter [ -v ]
       -v          increase verbosity
}}}

''snapshooter'' uses the configuration file, '''conf/distribution.conf''', to determine if the Solr server is a master or slave. snapshooter is disabled on all slave Solr servers. When invoked on a slave server, snapshooter displays an error message and exits with error code 1 without taking a snapshot.

== rsyncd-enable ==

   {{{
usage: rsyncd-enable [ -v ]
       -v          increase verbosity
}}}

''rsyncd_enable'' enables the starting of the rsyncd daemon by creating the file rsyncd-enabled in the top level directory of the Solr installation (for example, /var/opt/resin3/7000).  Please note that this script will not actually starts the rsyncd daemon.

== rsyncd-disable ==

   {{{
usage: rsyncd-disable [ -v ]
       -v          increase verbosity
}}}

''rsyncd-disable'' disables the starting of the rsyncd daemon by removing the file, rsyncd-enabled, from the top level directory of the Solr installation (for example, /var/opt/resin3/7000).  Please note that this script will not actually stop the rsyncd daemon if it is already running.

== rsyncd-start ==

   {{{
usage: rsyncd-start
}}}

Starts the rsyncd daemon on the master Solr server. The rsyncd daemon sets its port number to be the port number of the master Solr server incremented by 10000. For example, if the master Solr server runs at port 7000, then its  rsyncd daemon runs at port 17000. The start script is synchronous. After starting the rsyncd daemon, it will attempt to connect to it for up to 15 seconds. The start script will exit with error code 2 if it fails to connect to the rsyncd daemon. The configuration of the rsyncd daemon is controlled by the file, conf/rsyncd.conf. The process ID of the rsyncd daemon is written into the file, logs/rsyncd.pid. Output of the rsyncd daemon is written to the file, logs/rsyncd.log.

== rsyncd-stop ==

   {{{
usage: rsyncd-stop
}}}

Stops the rsyncd daemon on the master Solr server. The stop script is synchronous. After stopping the rsyncd daemon, it makes sure that the daemon has exited by trying to connect to it for up to 300 seconds. The stop script will exit with error code 2 if it fails to stop the rsyncd daemon.

== snappuller-enable ==

   {{{
usage: snappuller-enable [ -v ]
       -v          increase verbosity
}}}

''snappuller_enable'' enables the snappuller by creating the file, snappuller-enabled, in the top level directory of the Solr installation (for example, /var/opt/resin3/7000).

== snappuller-disable ==

   {{{
usage: snappuller-disable [ -v ]
       -v          increase verbosity
}}}

''snappuller-disable'' disables the snappuller by removing the file, snappuller-enabled, from the top level directory of the Solr installation (for example, /var/opt/resin3/7000).

== snappuller ==

   {{{
usage: snappuller -m master -p port [-n snapshot] [ -svz ]
       -m master   hostname of master server from where to pull index snapshot
       -p port     port number of master server from where to pull index snapshot
       -n snapshot pull a specific snapshot by name
       -s          use the --size-only option with rsync
       -v          increase verbosity (-vv show file transfer stats also)
       -z          enable compression of data
}}}

''snappuller'' gets the hostname and port number of the master Solr server from the file conf/distribution.conf. The values in conf/distribution.conf are overwritten by the command line options, -m and -p ,if they are present.

If snappuller has been disabled, it will log an appropriate message in its log file, and then exit without pulling any snapshot from the master Solr server.

If the name of the snapshot to be pull is not specified by the use of the "-n" option, snappuller will use ssh to determine the name of the most recent snapshot available on the master Solr server and pull it over if it does not already exist on the slave Solr server.

The status and stats of the current or most recent rsync operation of snappuller is kept in the file, logs/snappuller.status. Whenever this file is updated by snappuller, a copy is scp back to the master Solr server. See Distribution Status and Stats for more details.

== snapinstaller ==

   {{{
usage: snapinstaller -m master -p port [ -v ]
       -m master   hostname of master server where snapshot stats are posted
       -p port     port number of master server from where to pull index snapshot
       -v          increase verbosity
}}}

''snapinstaller'' gets the hostname and port number of the master Solr server from the file conf/distribution.conf. The values in conf/distribution.conf are overwritten by the command line options, -m and -p, if they are present.

After a snapshot has been installed, snapinstaller writes its name into the file, logs/snapshot.current, and scp a copy of this file back to the master Solr server. See Distribution Status and Stats for more details.

== snapcleaner ==

   {{{
usage: snapcleaner -d <days> | -n <num> [ -v ]
       -d <days>    cleanup snapshots more than <days> days old
       -n <num>     keep the most most recent <num> number of snapshots and
                    cleanup up the remaining ones that are not being pulled
       -v           increase verbosity
}}}