Solr: Backed up? Now you can restore it back

One of the lesser known but cool features of ReplicationHandler is the support it provides 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 this index, you can do it as follows:


This will take a snapshot of your index in the 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 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!