consul kv export --http-addr=localhost:8500 > kv.json
consul kv import --http-addr=http://10.12.142.216:8500 -token=b3a9bca3-6e8e-9678-ea35-ccb8fb272d42 @consul_kv_20180521150322.json
文件内容:值base64加密了!下面进行解密
[ { "key": "PlatForm/", "flags": 0, "value": "" }, { "key": "PlatForm/SeviceName", "flags": 0, "value": "REdD" }, { "key": "RabbiMQAddress/AffairApply", "flags": 0, "value": "WWVzV2F5LVJhYmJpdE1RLVNlcnZlcg==" }]
打开浏览器控制台:
var a=[ { "key": "PlatForm/", "flags": 0, "value": "" }, { "key": "PlatForm/SeviceName", "flags": 0, "value": "REdD" }, { "key": "RabbiMQAddress/AffairApply", "flags": 0, "value": "WWVzV2F5LVJhYmJpdE1RLVNlcnZlcg==" }]; a.forEach(item=>item.value=window.atob(item.value)); JSON.stringify(a) 解密完毕!