Giter Site home page Giter Site logo

graylog2-migrator's Introduction

Graylog2 Migrator

A tool to migrate data from a pre-0.20.x Graylog2 version to a new instance. It only supports streams and streamrules for now.

WARNING

This is an early release which hasn't received much testing yet!

Installation

Download the JAR file from the Releases page or build with mvn package.

Usage

Make sure to backup the old and new Graylog2 MongoDB databases before using this tool!

Use the -h flag to show the available command line options.

$ java -jar graylog2-migrator-0.20.0.jar -h
  Options:
        --creator
       Value for the creator_user_id field
       Default: admin
  *     --from-db
       Source database URI (Example: mongodb://localhost/graylog2old)
        --from-version
       Graylog2 version of the source database
       Default: 0.12.0
    -h, --help
       Show usage information and exit
       Default: false
  *     --to-db
       Target database URI (Example: mongodb://localhost/graylog2new

Command Line Options

  • --from-version -- The Graylog2 version of the source database.
  • --from-db -- The Graylog2 source database URI. This is the database of your old Graylog2 instance.
  • --to-db -- The Graylog2 source database URI. This is the database of your new Graylog2 instance.
  • --creator -- Use the given user id as a creator of the migrated streams.

Example

$ java -jar target/graylog2-migrator-0.20.0-SNAPSHOT.jar --from-db mongodb://localhost/graylog2old --to-db mongodb://localhost/graylog2
2014-05-14 17:34:42,719 INFO : Migrating data from version 0.12.0
2014-05-14 17:34:42,722 INFO : Connecting to mongodb://localhost:27017/graylog2old
2014-05-14 17:34:42,808 INFO : Connecting to mongodb://localhost:27017/graylog2
2014-05-14 17:34:42,878 INFO : Migrating Stream object 5370cea00e77760892000009 (Oldstream)
2014-05-14 17:34:42,898 INFO : Migrating Stream rule object 5370cea30e7776089200000b
2014-05-14 17:34:42,900 INFO : Migrating Stream rule object 53721e280e777608a4000003
2014-05-14 17:34:42,902 INFO : Migrating Stream rule object 537226be0e77760b0a000003
2014-05-14 17:34:42,903 WARN : Unsupported stream rule field: Stream rule type FILENAME_LINE not supported
2014-05-14 17:34:42,903 INFO : Migrating Stream rule object 53722e890e77760f5c000005
2014-05-14 17:34:42,904 INFO : DONE
$

graylog2-migrator's People

Contributors

bernd avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.