Reference: http://blog.csdn.net/adparking/article/details/6931054
1. Start a test with the Ttserver note all the paths used are absolute paths
Ttserver-host 192.168.0.100-port 20000-thnum 4-dmn-ulim 1024m-ulog $ (PWD)/ulog/-log $ (PWD)/temp/test.log-pid $ (pwd )/temp/test.pid-sid 9 $ (PWD)/temp/test_data.tch#bnum=1000#rcnum=0#xmsiz=0m
2. View server Statistics
Tcrmgr Inform-port 20000-st 192.168.0.100
3. Write Data
Tcrmgr put-port 20000 192.168.0.100 test1 value1
4. Reading data
Tcrmgr get-port 20000 192.168.0.100 test1
5. Delete data
Tcrmgr out-port 20000 192.168.0.100 test1
6. View all key
Tcrmgr List-port 20000 192.168.0.100
7. Backup Data
Note: The path is the absolute path on the server, otherwise the "./tcrmgr:error:9999:miscellaneous error" is displayed.
Tcrmgr copy-port 20000 192.168.0.100 $ (PWD)/temp/test2.tch
8. Log export (printed on screen, hexadecimal string format)
Note: commands are different.
Note: The directory is the absolute path to the Ulog on the server
Ttulmgr Export $ (PWD)/ulog/
9. Synchronizing memory data to disk (there is nothing special about it, probably when Ttserver uses the-uas parameter to write the log asynchronously)
Tcrmgr Sync-port 20000 192.168.0.100
10. Data import
Note: Files in the TSV Format are tab-delimited, such as: test2\tvalue2\n
Note: The path is a local path, so it does not have to be an absolute path
Tcrmgr importtsv-port 20000 192.168.0.100 TEMP/2.TSV
11. Recover Data via Ulog log
Note: The path is the absolute path on the server
Tcrmgr restore-port 20000 192.168.0.100 $ (PWD)/old_ulog/
12. Print update log (suspend, always show log)
It might be for real-time viewing ttserver, which is equivalent to Tail-f
Tcrmgr Repl-port 20000-ph 192.168.0.100
13. Next Experiment:start a ttserver with a copy function, with the front-initiated ttserver as Master
Ttserver-host 192.168.0.100-port 20001-mhost 192.168.0.100-mport 20000-rcc-rts $ (pwd)/temp_1/test_1.rts-thnum 4-DM N-ulim 1024m-ulog $ (PWD)/temp_1/-log $ (PWD)/temp_1/test_1.log-pid $ (PWD)/temp_1/test_1.pid-sid $ (PWD)/temp_1/test _1.tch#bnum=1000#rcnum=0#xmsiz=0m
14. Restart a normal ttserver, not associated with other servers
Ttserver-host 192.168.0.100-port 20002-thnum 4-dmn-ulim 1024m-ulog $ (PWD)/ulog_2/-log $ (PWD)/temp_2/test_2.log-pid $ (PWD)/temp_2/test_2.pid-sid $ (PWD)/temp_2/test_data_2.tch#bnum=1000#rcnum=0#xmsiz=0m
15. Modify the master of a Ttserver
Tcrmgr setmst-port 20001-mport 20002 192.168.0.100 192.168.0.100
Note: Only ttserver, which is initiated in replication, can be modified to copy data from the new database
Note: Each ttserver can only have one master, and after modification, no more data can be replicated from the previous master