The Rewrite-TsFile tool is used to write the data in TsFile to the running IoTDB.
Run rewrite-tsfile.bat if you are in a Windows environment, or rewrite-tsfile.sh if you are on Linux or Unix.
./rewrite-tsfile.bat -f filePath [-h host] [-help] [-p port] [-pw password] -u user -f File or Dictionary to be loaded. -h Host Name (optional, default 127.0.0.1) -help Display help information(optional) -p Port (optional, default 6667) -pw password (optional) -u User name (required)
Assuming that an IoTDB instance is running on server 192.168.0.101:6667, you want to load all TsFile files from the locally saved TsFile backup folder D:\IoTDB\data into this IoTDB instance.
First move to the folder where rewrite-tsfile.bat is located, open the command line, and execute
./load-rewrite.bat -f "D:\IoTDB\data" -h 192.168.0.101 -p 6667 -u root -pw root
After waiting for the script execution to complete, you can check that the data in the IoTDB instance has been loaded correctly.