To restore Elasticsearch logs from backup in Foresight Mobile Platform 23.05 or later:
Copy the elasticsearch_backup.py and create_elastic_backup_standalone.sh scripts and place them in the folder with the docker-compose.standalone.yml file:
If Foresight Mobile Platform 23.12 is used, use the elasticsearch_backup.py and create_elastic_backup_standalone.sh scripts contained in the standalone_compose_files_v23.12.01.zip archive.
If Foresight Mobile Platform 23.05 is used, download the restore_elasticsearch.zip archive and unarchive it.
Place the elastic_backup folder with the docker-compose.standalone.yml file. If the backup was created for the general system, elastic_backup will be contained in the standalone_backup_<date and time of backup creation> folder.
Start the elasticsearch_backup.py script using Python 3.6 or later:
python3 elasticsearch_backup.py restore
Check system performance and volume of restored data:
Check cache data volume. If the data volume is not full, delete cache and add it again in the Cache Control subsection.
Reset JWT expiration time for API users and administrators. To do this, change values of the parameters: Expiration Time of JWT Token for API Users, Expiration Time of JWT Token for Administrators, Expiration Time of refresh JWT for API Users and Administrators in the Security subsection.
Add accounts of API users if they were added after creating a backup.
After executing the operations the Elasticsearch logs are restored from the backup.
See also:
Creating a Backup and Restoring System | Creating a Backup of Elasticsearch Logs in Foresight Mobile Platform 23.05 or Later