User Tools

Site Tools


wiki:graylog_backup_and_restore

Graylog backup and restore

Installation of Graylog docker

Dump the mongodb

mongodump --db=graylog --out=/usr/share/graylog/data/graylogmongo.dump

Copy the config folder from /usr/share/graylog/data/config to restore inputs etc. Config dir listing:

graylog@e9533406c3a6:~$ ls /usr/share/graylog/data/config/
graylog.conf  log4j2.xml  node-id  server.conf	server.conf.dpkg-dist

Bare metal configuration is usually in /etc/graylog/server/

Restore

mongorestore --drop graylogmongo.dump

Above will drop the tables (collections) if they exist but only those in the backup.

Copy the backed up data back and restart graylog.

Also check the log4j2.xml file to make sure the paths are correct for loggin etc.

Tested on

  • Debian 11 Bullseye (vagrant)
  • docker_compose_version: v2.2.3
  • graylog_version: 4.2-jre11
  • mongodb_version: 4.2

See also

References

wiki/graylog_backup_and_restore.txt · Last modified: 2022/02/18 13:44 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki