diff --git a/init_snowstorm.sh b/init_snowstorm.sh deleted file mode 100644 index f989f22..0000000 --- a/init_snowstorm.sh +++ /dev/null @@ -1,29 +0,0 @@ -if [ ! -f /status/script_executed ]; then - echo "Waiting for Elasticsearch to be healthy..." - sleep 30 - echo "Executing script..." - echo "1. Setup backup repository" - curl -X PUT "elasticsearch:9200/_snapshot/snowstorm_preload_server" -H 'Content-Type: application/json' -d' -{ - "type": "url", - "settings": { - "url": "https://storage.googleapis.com/snowstorm-preload/" - } -} -' - sleep 15 - echo "2. Delete existing data" - curl -X DELETE elasticsearch:9200/_all - sleep 30 - echo "3. Download and restore data" - curl -X POST "elasticsearch:9200/_snapshot/snowstorm_preload_server/snowstorm_10.3.1_spain_20240331/_restore?wait_for_completion=true" -H 'Content-Type: application/json' -d' -{ - "indices": "*", - "ignore_unavailable": true -} -' - echo "4. Saving status" - echo "1" >> /status/script_executed -else - echo "Initialization skipped" -fi \ No newline at end of file