File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ for f in $1; do
2424 # curl -X POST -T $f will stream it. See https://github.com/TranslatorSRI/NameResolution/issues/194
2525 curl -H ' Content-Type: application/json' -X POST -T $f \
2626 " $SOLR_SERVER /solr/name_lookup/update/json/docs?processor=uuid&uuid.fieldName=id&commit=true"
27- sleep 30
27+ sleep 60
2828done
2929echo " Check solr"
3030curl -s --negotiate -u: " $SOLR_SERVER /solr/name_lookup/query?q=*:*&rows=0"
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ set -uo pipefail
1818
1919# Configuration options
2020SOLR_SERVER=" http://localhost:8983"
21+ SLEEP_INTERVAL=60
2122
2223# Please don't change these values unless you change NameRes appropriately!
2324COLLECTION_NAME=" name_lookup"
@@ -43,12 +44,16 @@ CORE_NAME="${COLLECTION_NAME}_shard1_replica_n1"
4344echo " Starting Solr restore on core ${CORE_NAME} , with status at ${SOLR_SERVER} /solr/${CORE_NAME} /replication?command=restorestatus"
4445RESTORE_URL=" ${SOLR_SERVER} /solr/${CORE_NAME} /replication?command=restore&location=/var/solr/data/var/solr/data/&name=${BACKUP_NAME} "
4546wget -O - " $RESTORE_URL "
46- sleep 10
47+ sleep " $SLEEP_INTERVAL "
4748RESTORE_STATUS_URL=" ${SOLR_SERVER} /solr/${CORE_NAME} /replication?command=restorestatus"
48- RESTORE_STATUS=$( wget -q -O - " $RESTORE_STATUS_URL " 2>&1 | grep " success" ) >&2
49+ RESTORE_STATUS=$( wget -q -O - " $RESTORE_STATUS_URL " 2>&1 | grep " success" )
50+ RESTORE_STATUS=" "
4951until [ -n " $RESTORE_STATUS " ] ; do
50- echo " Solr restore in progress. Note: if this takes too long please check Solr health ."
51- RESTORE_STATUS=$( wget -O - " $RESTORE_STATUS_URL " 2>&1 | grep " success" ) >&2
52- sleep 10
52+ echo " Solr restore in progress. If this takes longer than 30 minutes, please visit ${SOLR_SERVER} with your browser to check Solr."
53+ RESTORE_STATUS=$( wget -q - O - " $RESTORE_STATUS_URL " 2>&1 | grep " success" )
54+ sleep " $SLEEP_INTERVAL "
5355done
54- echo " Solr restore complete"
56+ echo " Solr restore complete!"
57+
58+ echo " Solr contents:"
59+ curl -s --negotiate -u: " $SOLR_SERVER /solr/name_lookup/query?q=*:*&rows=0"
You can’t perform that action at this time.
0 commit comments