Skip to main content

...About 1 min

MLogLoad Tool


The MLogLoad tool is used to load the metadata from mlog.bin and tags and attributes from tlog.txt into the running IoTDB.
Metadata operation in mlog.bin will be replayed.
Metedata to be loaded that conflicts with metadata in the running IoTDB will be skipped.

If there is already metadata in the running IoTDB, to avoid replaying the delete operation to affect the existing metadata, it needs to be loaded using mlog.bin and tlog.txt obtained from the export metadata operationopen in new window.

How to Use


./ -mlog /yourpath/mlog.bin -tlog /yourpath/tlog.txt -h -p 6667 -u root -pw root


./mLogLoad.bat -mlog /yourpath/mlog.bin -tlog /yourpath/tlog.txt -h -p 6667 -u root -pw root

usage: MLogLoad -mlog <mlog file> [-tlog <tlog file>] [-h <receiver host>]
       [-p <receiver port>] [-u <user>] [-pw <password>] [-help]
 -mlog <mlog file>    Need to specify a binary mlog.bin file to parse
 -tlog <tlog file>    Could specify a binary tlog.txt file to parse. Tags
                      and attributes will be ignored if not specified
 -h <receiver host>   Could specify a specify the receiver host, default
                      is (optional)
 -p <receiver port>   Could specify a specify the receiver port, default
                      is 6667 (optional)
 -u <user>            Could specify the user name, default is root
 -pw <password>       Could specify the password, default is root
 -help,--help         Display help information

Note: If tlog is not specified, the MLogLoad tool will ignore tags and attributes management.


The purpose is to load the local metadata file /yourpath/mlog.bin into IoTDB instance running on server

Enter to the directory where mLogLoad.shopen in new window is located and execute the following statement:

./ -mlog "/yourpath/mlog.bin" -h -p 6667 -u root -pw root

After waiting for the script execution to complete, you can check that the metadata in the IoTDB instance has been loaded correctly.


  • Cannot find or load the main class MLoadLoader
    • It may be because the environment variable $IOTDB_HOME is not set, please set the environment variable and try again

Copyright © 2024 The Apache Software Foundation.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.