我正在使用Couchbase Server 4.5.1。
我正在尝试cbrestore
一个已在Ubuntu上使用cbbackup
备份的存储桶,我收到以下异常:
/Applications/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbrestore . http://localhost:8091 -u Administrator -p st0ryplAyr --bucket-source=storyplayer-api --bucket-destination=storyplayer-api -v -x rehash=1
2017-06-27 09:51:02,610: mt cbrestore...
2017-06-27 09:51:02,610: mt source : .
2017-06-27 09:51:02,610: mt sink : http://localhost:8091
2017-06-27 09:51:02,610: mt opts : {'username': '<xxx>', 'verbose': 1, 'extra': {'max_retry': 10.0, 'rehash': 1.0, 'dcp_consumer_queue_length': 1000.0, 'data_only': 0.0, 'uncompress': 0.0, 'nmv_retry': 1.0, 'conflict_resolve': 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}, 'ssl': False, 'threads': 4, 'to_date': None, 'key': None, 'password': '<xxx>', 'id': None, 'bucket_source': 'storyplayer-api', 'silent': False, 'dry_run': False, 'from_date': None, 'bucket_destination': 'storyplayer-api', 'add': False, 'vbucket_list': None}
2017-06-27 09:51:02,615: mt bucket: storyplayer-api
Exception in thread s0:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/lib/python/pump_mc.py", line 91, in run
rv, batch, need_backoff = self.scatter_gather(mconns, batch)
File "/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/lib/python/pump_cb.py", line 72, in scatter_gather
rv, conn = self.find_conn(mconns, vbucket_id, msgs)
File "/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/lib/python/pump_cb.py", line 316, in find_conn
host_port = serverList[vBucketMap[vbucket_id][0]]
IndexError: list index out of range
我之前遇到了相同的错误(或类似错误),这就是我使用rehash=1
选项的原因,但这次没有用。
关于我能做什么的任何想法?
答案 0 :(得分:0)
我回答这个问题有点晚了,但是您必须在命令中添加“ -x rehash = 1”:
cbrestore ~/backups http://127.0.0.1:8091 -u Administrator -p password -x rehash=1
为什么Couchbase在大多数操作系统上具有1024个vBucket,但是在Mac上只有64个vBucket(出于优化目的),因此您需要重新哈希以在所有vbucket之间重新分配数据。