2016-02-28 60 views
0

我試着用coubbase v4.0.0的cbbackup和cbtransfer cli來備份couchbase v3.0.1。這兩個命令都失敗了。以下是cbbackup命令的輸出。我想知道爲什麼高版本的cli不能用低版本的couchbase工作?他們是否向前兼容?可以使用高版本的couchbase-cli來備份低版本的couchbase嗎?

[cb-v4.0.0]$ /opt/couchbase/bin/cbbackup http://<cb-v3.0.1>:8091 /tmp/cbbackup -u 'xxxx' -p '***' -v 
2016-02-28 03:05:28,679: mt cbbackup... 
2016-02-28 03:05:28,679: mt source : http://<cb-v3.0.1>:8091 
2016-02-28 03:05:28,679: mt sink : /tmp/cbbackup 
2016-02-28 03:05:28,679: mt opts : {'username': '<xxx>', 'verbose': 1, 'dry_run': False, 'extra': {'max_retry': 10.0, 'rehash': 0.0, 'dcp_consumer_queue_length': 1000.0, 'data_only': 0.0, 'uncompress': 0.0, 'nmv_retry': 1.0, 'cbb_max_mb': 100000.0, 'report': 5.0, 'mcd_compatible': 1.0, 'try_xwm': 1.0, 'backoff_cap': 10.0, 'batch_max_bytes': 400000.0, 'report_full': 2000.0, 'flow_control': 1.0, 'batch_max_size': 1000.0, 'seqno': 0.0, 'design_doc_only': 0.0, 'recv_min_bytes': 4096.0}, 'single_node': False, 'ssl': False, 'vbucket_list': None, 'threads': 4, 'mode': 'full', 'key': None, 'password': '<xxx>', 'id': None, 'silent': False, 'bucket_source': None} 
2016-02-28 03:05:28,713: mt bucket: productbucket 
2016-02-28 03:05:44,590: w0 source : http://<cb-v3.0.1>:8091([email protected]:8091) 
2016-02-28 03:05:44,590: w0 sink : /tmp/cbbackup([email protected]:8091) 
2016-02-28 03:05:44,590: w0   :    total |  last | per sec 
2016-02-28 03:05:44,590: w0 batch :     171 |  171 |  10.8 
2016-02-28 03:05:44,590: w0 byte :    69447174 | 69447174 | 4374738.4 
2016-02-28 03:05:44,590: w0 msg :    28346 |  28346 |  1785.6 
    [####################] 100.0% (28346/estimated 28346 msgs) 
bucket: productbucket, msgs transferred... 
     :    total |  last | per sec 
batch :     171 |  171 |  10.7 
byte :    69447174 | 69447174 | 4331609.4 
msg :    28346 |  28346 |  1768.0 
Traceback (most recent call last): 
    File "/opt/couchbase/lib/python/cbbackup", line 12, in <module> 
    pump_transfer.exit_handler(pump_transfer.Backup().main(sys.argv)) 
    File "/opt/couchbase/lib/python/pump_transfer.py", line 94, in main 
    rv = pumpStation.run() 
    File "/opt/couchbase/lib/python/pump.py", line 140, in run 
    self.transfer_bucket_index(source_bucket, source_map, sink_map) 
    File "/opt/couchbase/lib/python/pump.py", line 267, in transfer_bucket_index 
    source_bucket, source_map) 
    File "/opt/couchbase/lib/python/pump_dcp.py", line 92, in provide_index 
    err, index_server = pump.filter_server(opts, source_spec, 'index') 
    File "/opt/couchbase/lib/python/pump.py", line 1057, in filter_server 
    if filtor in node["services"] and node["status"] == "healthy": 
KeyError: 'services' 

回答

1

很遺憾,現在不支持。目前,我們正在爲一組目標版本支持所有Couchbase工具。

一種解決方法是使用3.0.1羣集中的XDCR將數據移動到4.0羣集。

0

除了上述接受的解決方案,你可以使用來自3.x的服務器桶cbtransfer工具來備份數據,然後使用備份數據來填充x服務器鬥

# ssh to 3.x server 
$ cbtransfer -b <bucket> http://<3.x.server.ip>:8091 bucket-backup 
# copy back-up data to 4.x server from 3.x server using scp or similar tool 
# ssh 4.x server 
$ cbtransfer -B <bucket> http://<4.x.server.ip>:8091 bucket-backup 

切換服務器的原因是爲cbtransfer使用正確的bin可執行文件。

相關問題