You can back up Solr collections to your local cluster or a remote cluster using the
solrctl utility to minimize data loss caused by accidental or malicious administrative actions.
Learn how to create, prepare, and export the Solr collection snapshot to create a backup of the
Solr collection.
If you are using a secure (Kerberos-enabled) cluster,
specify your jaas.conf file by adding the following parameter
to each
command:
--jaas [***/PATH/TO/JAAS.CONF***]
If TLS is enabled for the Solr service, specify the truststore and password using
the ZKCLI_JVM_FLAGS environment variable before you begin the
procedure:
If you are backing up the Solr collection to a remote cluster, prepare the
snapshot for export. If you are backing up the Solr collection to the local
cluster, skip this step.
The destination HDFS directory path
([***DESTINATION_DIRECTORY***], specified by the
-d option) must exist on the local cluster before you
run this command. Make sure that the Solr superuser (solr
by default) has permission to write to this directory.
Export the snapshot. This step uses the DistCp utility to back up the collection
metadata as well as the corresponding index files. The destination directory must exist
and be writable by the Solr superuser (solr by default).
To export the snapshot to a remote cluster, run the following
command: