Hi there,
I'm currently trying to restore a core from a snapshot, and it does not work as
excepted (in my case).
My context:
I'm using solr 5.3.0
i used named snapshot and specific location to ensure collection integrity a a
time in a single directory
below, i will describe backup/restore for a specific core
backup command:
http://10.0.2.15:8080/solr/test_shard2_replica1/replication?wt=json&command=backup&location=%2Fhome%2Fsolr%2Ftest%2F20151128-073603009560&name=test_shard2_replica1
it has created the snapshot with all data:
[vagrant@centos7 solr-5.3.0]$ ls -lh
/home/solr/test/20151128-073603009560/snapshot.test_shard1_replica2/
total 32K
-rw-r--r-- 1 solr solr 346 Nov 28 07:36 _5.fdt
-rw-r--r-- 1 solr solr 84 Nov 28 07:36 _5.fdx
-rw-r--r-- 1 solr solr 431 Nov 28 07:36 _5.fnm
-rw-r--r-- 1 solr solr 110 Nov 28 07:36 _5_Lucene50_0.doc
-rw-r--r-- 1 solr solr 697 Nov 28 07:36 _5_Lucene50_0.tim
-rw-r--r-- 1 solr solr 171 Nov 28 07:36 _5_Lucene50_0.tip
-rw-r--r-- 1 solr solr 432 Nov 28 07:36 _5.si
-rw-r--r-- 1 solr solr 165 Nov 28 07:36 segments_7
i flush all data from the same core and restart the solr5 instance and then try
to restore from the previous snapshot:
[vagrant@centos7 solr-5.3.0]$ curl
"http://10.20.1.16:8082/solr/test_shard1_replica2/replication?wt=json&command=restore&location=%2Fhome%2Fsolr%2Ftest%2F20151128-073603009560&name=test_shard1_replica2";
{"responseHeader":{"status":0,"QTime":53},"status":"OK"}
all seems to be OK, let's verify
[vagrant@centos7 solr-5.3.0]$ curl
"http://10.20.1.16:8082/solr/test_shard1_replica2/replication?wt=json&command=restorestatus"{"responseHeader":{"status":0,"QTime":2},"restorestatus":{"snapshotName":"snapshot.test_shard1_replica2","status":"success"}}
great!! what about logs:
[...skipped data...]
2015-11-28 07:42:39.128 INFO
(restoreExecutor-8-thread-1-processing-x:test_shard1_replica2 r:core_node4
test_shard1_replica2 n:10.20.1.16:8082_solr snapshot.test_shard1_replic
a2 s:shard1 c:test //home//solr//test//20151128-073603009560) [c:test s:shard1
r:core_node4 x:test_shard1_replica2] o.a.s.h.RestoreCore Copying file _5.fdt to
restore directory
2015-11-28 07:42:39.129 INFO
(restoreExecutor-8-thread-1-processing-x:test_shard1_replica2 r:core_node4
test_shard1_replica2 n:10.20.1.16:8082_solr snapshot.test_shard1_replic
a2 s:shard1 c:test //home//solr//test//20151128-073603009560) [c:test s:shard1
r:core_node4 x:test_shard1_replica2] o.a.s.h.RestoreCore Copying file
_5_Lucene50_0.tip to restor
e directory
2015-11-28 07:42:39.129 INFO
(restoreExecutor-8-thread-1-processing-x:test_shard1_replica2 r:core_node4
test_shard1_replica2 n:10.20.1.16:8082_solr snapshot.test_shard1_replic
a2 s:shard1 c:test //home//solr//test//20151128-073603009560) [c:test s:shard1
r:core_node4 x:test_shard1_replica2] o.a.s.h.RestoreCore Copying file _5.si to
restore directory
2015-11-28 07:42:39.130 INFO
(restoreExecutor-8-thread-1-processing-x:test_shard1_replica2 r:core_node4
test_shard1_replica2 n:10.20.1.16:8082_solr snapshot.test_shard1_replic
a2 s:shard1 c:test //home//solr//test//20151128-073603009560) [c:test s:shard1
r:core_node4 x:test_shard1_replica2] o.a.s.h.RestoreCore Copying file
_5_Lucene50_0.doc to restor
e directory
2015-11-28 07:42:39.132 INFO
(restoreExecutor-8-thread-1-processing-x:test_shard1_replica2 r:core_node4
test_shard1_replica2 n:10.20.1.16:8082_solr snapshot.test_shard1_replic
a2 s:shard1 c:test //home//solr//test//20151128-073603009560) [c:test s:shard1
r:core_node4 x:test_shard1_replica2] o.a.s.h.RestoreCore Copying file
_5_Lucene50_0.tim to restor
e directory
2015-11-28 07:42:39.134 INFO
(restoreExecutor-8-thread-1-processing-x:test_shard1_replica2 r:core_node4
test_shard1_replica2 n:10.20.1.16:8082_solr snapshot.test_shard1_replic
a2 s:shard1 c:test //home//solr//test//20151128-073603009560) [c:test s:shard1
r:core_node4 x:test_shard1_replica2] o.a.s.h.RestoreCore Copying file _5.fdx to
restore directory
[...skipped data...]
Wow , i love solr ;)
now, let's have a look at data directory:
[vagrant@centos7 solr-5.3.0]$ ls -lh
/usr/local/third/solr-5.3.0/server/solr/test_shard1_replica2/data/*
-rw-r--r-- 1 solr solr 92 Nov 28 07:42
/usr/local/third/solr-5.3.0/server/solr/test_shard1_replica2/data/index.properties
/usr/local/third/solr-5.3.0/server/solr/test_shard1_replica2/data/restore.snapshot.test_shard1_replica2:
total 0
-rw-r--r-- 1 solr solr 0 Nov 28 07:42 write.lock
/usr/local/third/solr-5.3.0/server/solr/test_shard1_replica2/data/tlog:
total 0
Hum, no data, what did i miss?
in order to workaround, i can restore from filesystem, but this behavior is
making me mad :)
thanks for your help ;)