lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Thacker (JIRA)" <>
Subject [jira] [Commented] (SOLR-6637) Solr should have a way to restore a core
Date Sat, 01 Nov 2014 16:41:33 GMT


Varun Thacker commented on SOLR-6637:


1. We can issue only one restore command for a core.
2. If the "location" is not provided in the query string then we default it to core.getDataDir()
. We do the same while taking backups hence this behaviour instead of making it mandatory.

In RestoreCore we do the following - 
1. Close the current index writer
2. Copy over all files from the backup location to the current index directory. 
3. Remove any files in the current directory which does not belong to the segment .( Hmm..
this might not work when there are multiple segments ) Maybe instead of using 

SegmentInfos.readCommit(dir, segmentFileName)

we just need to do something simple i.e just keep track of what files were before and what
files are currently present and remove the unwanted. I will check if this needs to be fixed.

4. Open a new writer and searcher against the index before we return restore success.

We track the status of the restore with a "restorestatus" API. This checks if the future is
finished executing or not.

> Solr should have a way to restore a core
> ----------------------------------------
>                 Key: SOLR-6637
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Varun Thacker
>         Attachments: SOLR-6637.patch, SOLR-6637.patch
> We have a core backup command which backs up the index. We should have a restore command
> This would restore any named snapshots created by the replication handlers backup command.
> While working on this patch right now I realized that during backup we only backup the
index. Should we backup the conf files also? Any thoughts? I could separate Jira for this.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message