Skip to content

Instantly share code, notes, and snippets.

@huksley
Created May 16, 2013 10:08
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save huksley/5590722 to your computer and use it in GitHub Desktop.
Save huksley/5590722 to your computer and use it in GitHub Desktop.
Clean all data in graylog2 without deleting settings, with full restart
#!/bin/sh
service elasticsearch stop
service graylog2-server stop
killall -9 java
service apache2 stop
rm -Rf /opt/elasticsearch/data/*
# IF YOU HAVE AUTH USE THIS LINE - mongo graylog2 --eval "db.auth('graylog2', 'PASSWORD'); db.message_counts.remove();"
mongo graylog2 --eval "db.message_counts.remove();"
service elasticsearch start
service graylog2-server start
service apache2 start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment