Back up and restore Solr
When you use the
restoreSolr toolkit tasks to back up and restore the Solr index and ZooKeeper configuration, a call to the Solr REST API is made. The toolkit tasks create and restore a full backup of the non-transient Solr collections.
The non-transient Solr collections are backed up and restored by using the provided toolkit tasks. The following collection types are non-transient:
You must take the Solr backup before a database backup, and you must restore Solr after you restore the database.
environment.properties file, the
backup.solr.location.dir setting is the location where the Solr index and ZooKeeper configuration backups are created and restored from. This location must be accessible by every Solr node in your deployment.
backupSolrtoolkit task backs up the Solr index and ZooKeeper configuration to the
setup -t backupSolr
restoreSolrtoolkit task restores the Solr index and ZooKeeper configuration from a backup. You must pass the
timestampparameter to the toolkit task with a value for a backup in the
backup.solr.location.dirlocation.You must also specify the
hostnameparameter, with the hostname of the Liberty server where you are running the command, and that matches the value for the host-name attribute of the
<application>element in the topology.xml file. For example:
setup -t restoreSolr -p timestamp=<timestamp> --hostname <liberty.hostname>
backupSolr task is run, a directory is created named
<timestamp> is the timestamp of when the toolkit task was run and
<collection_name> the name of the Solr collection backed up. A directory is created for each non-transient Solr collection, with each collection containing a back up.
- i2a-solr-chart_index-20210420145332 - backup.properties - snapshot.shard1 - snapshot.shard2 - zk_backup - i2a-solr-main_index-20210420145332 - backup.properties - snapshot.shard1 - snapshot.shard2 - zk_backup - i2a-solr-match_index1-20210420145332 - backup.properties - snapshot.shard1 - snapshot.shard2 - zk_backup - i2a-solr-match_index2-20210420145332 - backup.properties - snapshot.shard1 - snapshot.shard2 - zk_backup