File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,17 +34,20 @@ echo "SOLR is up and running at ${SOLR_SERVER}."
3434# Step 2. Create fields for search.
3535SCRIPT_DIR=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " && pwd) "
3636source " $SCRIPT_DIR /../data-loading/setup_solr.sh"
37+ echo Solr database has been set up.
3738
3839# Step 3. Restore the data
3940CORE_NAME=" ${COLLECTION_NAME} _shard1_replica_n1"
41+ echo " Starting Solr restore on core ${CORE_NAME} , with status at ${SOLR_SERVER} /solr/${CORE_NAME} /replication?command=restorestatus"
4042RESTORE_URL=" ${SOLR_SERVER} /solr/${CORE_NAME} /replication?command=restore&location=/var/solr/data/var/solr/data/&name=${BACKUP_NAME} "
4143wget -O - " $RESTORE_URL "
4244sleep 10
43- RESTORE_STATUS=$( wget -q -O - ${SOLR_SERVER} /solr/${CORE_NAME} /replication? command=restorestatus 2>&1 | grep " success" ) >&2
45+ RESTORE_STATUS_URL=" ${SOLR_SERVER} /solr/${CORE_NAME} /replication?command=restorestatus"
46+ RESTORE_STATUS=$( wget -q -O - " $RESTORE_STATUS_URL " 2>&1 | grep " success" ) >&2
4447echo " Restore status: ${RESTORE_STATUS} "
45- until [ ! -z " $RESTORE_STATUS " ] ; do
46- echo " Solr restore in progress. Note: if this takes too long please check solr health."
47- RESTORE_STATUS=$( wget -O - ${SOLR_SERVER} /solr/ ${CORE_NAME} /replication ? command=restorestatus 2>&1 | grep " success" ) >&2
48+ until [ -n " $RESTORE_STATUS " ] ; do
49+ echo " Solr restore in progress. Note: if this takes too long please check Solr health."
50+ RESTORE_STATUS=$( wget -O - " $RESTORE_STATUS_URL " 2>&1 | grep " success" ) >&2
4851 sleep 10
4952done
5053echo " Solr restore complete"
You can’t perform that action at this time.
0 commit comments