0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MeshCentralのデータベースインスタンスを移行する

0
Posted at

デフォルトでは内蔵されたNeDBを使用したローカルDBに保存されていますが、MongoDBやPostgreSQLなどお好みのデータベースを利用できます。

既に運用中のMeshCentralインスタンスのデータベースを別のデータベースに移行する方法を説明します。

Dockerコンテナで運用している前提の説明ですが、直接インストールしている場合でも同じような操作です。

全ての操作を行う前に、必ずバックアップを取得してください。

  1. MeshCentralのコンテナに入り、データベースをダンプします(export先は永続化出来るならどこでもOK)

    cd /opt/meshcentral
    node meshcentral --dbexport /opt/meshcentral/meshcentral-data/backup.json
    
  2. MeshCentralのコンテナを停止後、meshcentral-data内のconfig.jsonに接続するデータベースの設定を追加します
    MongoDBの接続先設定
    PostgreSQLの接続先設定
    MariaDB/MySQLの接続先設定
    Sqlite3/Acebaseの接続先設定

  3. MeshCentralとデータベースのコンテナを起動後、MeshCentralのコンテナに入り、データベースにダンプをロードします

    cd /opt/meshcentral
    node meshcentral --dbimport /opt/meshcentral/meshcentral-data/backup.json
    
  4. MeshCentralのコンテナを再起動し、データが適切に移行されていることを確認して下さい

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?