# Check for upcoming deprecations you have to adjust before ugprading curl --insecure -uelastic:${es_password} https://127.0.0.1:9200/_migration/deprecations| jq # Check if indexes need migration curl --insecure -uelastic:${es_password} https://127.0.0.1:9200/_migration/system_features| jq # Migrate endpoints, if they say "MIGRATION NEEDED" or "ERROR" curl --insecure -uelastic:${es_password} -XPOST https://127.0.0.1:9200/_migration/system_features | jq # Remove ingest-attachment plugin (Elasticsearch has that on board starting with version 8) /usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment # Switch repository source from Elasticsearch 7 to 8 rm /etc/apt/sources.list.d/elastic-7.x.list curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | \ gpg --dearmor | tee /usr/share/keyrings/elasticsearch-keyring.gpg \ && chmod 644 /usr/share/keyrings/elasticsearch-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-8.x.list # Switch repository source from Elasticsearch 8 to 9 rm /etc/apt/sources.list.d/elastic-8.x.list echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/9.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-9.x.list