MongoDB backup script

You can run this on a scheduled task and it will take a backup of all databases, zip it and copy it to a backup location, and automatically remove older backups after 7 days. REM Create filename for output set filename=mongodb-backup-%DATE:~6,4%_%DATE:~3,2%_%DATE:~0,2%__%TIME:~0,2%_%TIME:~3,2%_%TIME:~6,2% REM Export the databases @echo Dumping databases to “%filename%”…

Diagnosing issues with Elasticsearch

We use logstash in our infrastructure, which ingests logs and outputs transformed data to a store of your choice, which for us is Elasticsearch. We then use Grafana to visualise some of this data. Recently we noticed that Grafana was struggling to perform the queries it needed, which led to…