[
https://issues.apache.org/jira/browse/SOLR-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193266#comment-14193266
]
Varun Thacker commented on SOLR-6637:
-------------------------------------
Sure.
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
{code}
SegmentInfos.readCommit(dir, segmentFileName)
{code}
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: https://issues.apache.org/jira/browse/SOLR-6637
> 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 too.
> 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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]