Code Monkey home page Code Monkey logo

mysql-migrator's Introduction

SonarQube MySQL Database Migrator

You can use the SonarQube MySQL Database Migrator to copy your SonarQube database from your MySQL (source) database to a non-MySQL (target) database.

Prerequisites

  • SonarQube version 6.7LTS to 7.8
    Note: Your source and target databases must be using the same version of SonarQube.
  • Currently using MySQL

Migrating your database

Warning: do not run migration on live SonarQube instances.

To copy your SonarQube database from your source database to the target database, follow these steps:

  1. Download the latest release of the migrator and unzip it.

  2. Start then stop the same version of SonarQube that you're running on your source database on your target database. For example, if you're running SonarQube 7.3 on your source database, run then stop SonarQube 7.3 on your target database.

  3. Delete the Elasticsearch data folder in the target SonarQube instance: data/es5 on SonarQube 6.7-7.6 and data/es6 on SonarQube 7.7 and above.

  4. Run the migrator with -help to get usage instructions.

Required parameters:

  • -source PATH where PATH is the path to the configuration file of your SonarQube instance running MySQL.
  • -target PATH where PATH is the path to the configuration file of your SonarQube instance running a non-MySQL database.

Note: The source database must be a MySQL database, and the target database must be a non-MySQL database.

The configuration files use the same format as sonar.properties file in a SonarQube installation, and you can even directly use the path to a sonar.properties file of a SonarQube instance. Your configuration files should be formatted as follows:

sonar.jdbc.url = jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.jdbc.username = sonar
sonar.jdbc.password = sonar

The migrator performs various sanity checks before copying data and prints diagnostics about its progress. It stops on the first error. Read the error messages carefully.

Migrating with an Oracle target

The Oracle database driver is not included in the distribution, so you must provide it yourself.

Please download the JDBC driver for Oracle and copy it to the mysql-migrator/lib directory in the unzipped folder of the migration tool. The file must be named oracle.jar exactly.

With the Java driver in place, follow the steps above to migrate just like any other database.

mysql-migrator's People

Contributors

donhui avatar drautureau-sonarsource avatar julienlancelot avatar mikebirnstiehl avatar sns-seb avatar xavierbourguignon avatar

Watchers

 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.