Solr: Backed up? Now you can restore soon!

By: Dikshant Shahi | May 8, 2015

One of the lesser known but cool features of ReplicationHandler is support for index backup. You must have used ReplicationHandler in your project for replicating index from master to slave instances. if you want to take backup of index, you can do it as follows:


This will take a snapshot of your index in directory snapshot.bkp_100 in /data directory. You can also specify the maximum number of backups you want and the directory you want to take the backup in. instead of /data directory.

Everything goes good till here. But what if you want to restore your index?  Well, you have to restore your index manually.

Wait, you don’t need to do restore your index manually anymore. With Solr 5.2 comes the provision to restore your index. Replication handler will expose additional API to restore your index. Restore would be as simple as below.


Happy restoring!

Dikshant Shahi (8 Posts)

Dikshant works as Solution Architect at The Digital Group. He takes interest in Semantic Search, Information Retrieval, Natural Language Processing and Machine Learning. He is the author of book "Apache Solr: A Practical Approach to Enterprise Search".

This post has been viewed 4,629 times

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>