couchbase最近已经可以使用了,现在最主要的是迁移问题。在它的官方文档里找了半天,终于在一个不起眼的地方找了到了怎么用。
先进入couchbase的脚本目录下,mac下是...../Couchbase\ Server.app/Contents/Resources/couchbase-core/bin下,在这个目录里有一堆很有用的脚本(当然也有很多在文档中找不到的脚本)。现在我们要用到的就是cbbackup 和 cbrestore这两个命令。
备份很简单,假设我们有叫做test这个bucket。当我们安装Couchbase的时候,会指定一个data目录,在这个目录里,有应该就有test-data这个目录,在这里面就是我们的数据文件。备份执行
sh cbbackup ..../data/test-data/test ~/tmp/
这样就将couchbase的test库的数据备份到了tmp文件夹了。
还原:还原是挺麻烦的,sh cbrestore -v ~/tmp/test ~/tmp/test-0.mb ~/tmp/test-1.mb ~/tmp/test-2.mb ~/tmp/test-3.mb,这就是将tmp备份文件还原的默认的default库中。
如果我们要还原test库,就将两个参数sh cbrestore -v -utest -PXXX ~/tmp/test ~/tmp/test-0.mb ~/tmp/test-1.mb ~/tmp/test-2.mb ~/tmp/test-3.mb,u为bucket名,P为密码(P一定要大写),然后就可以还原test库了。
分享到:
相关推荐
Developing with Couchbase Server
couchbase-server-community_5.1.1-windows_amd64,couchbase 社区版5.11 比redis 更强悍的nosql 数据库
linux下c++实现从couchbase集群读取,写入数据,测试可用
couchbase官方教程
主要讲解couchbase的安装和基本使用。按照教程的讲解,应该足够入门使用了。希望能帮助有需要的童鞋。 couchbase继承了memcache和nosql 同时如果有任何疑问,欢迎交流
Couchbase使用说明文档,文档中详细介绍了Couchbase从下载,安装到使用过程所需要注意的一切问题,包括下载,安装,设置,集群,.Net调用实例(增删改查)
python写couchbase增删改查 python写couchbase增删改查 python写couchbase增删改查 python写couchbase增删改查
Couchbase Server administration
Laravel开发-laravel-couchbase Laravel 5.6的CouchBase提供商
couchbase架构设计,学习couchbase的设计原理。
sync_gateway, 将 Couchbase Lite连接到Couchbase服务器 同步网关功能管理基于http的 Couchbase Lite移动客户端的数据访问利用 Couchbase服务器,因为它是水平缩放数据存储聚集到水平可以扩展的层提供访问控制和数据...
go-couchbase - Go语言中的Couchbase敏捷客户端
NULL 博文链接:https://mazilaidaige.iteye.com/blog/2068462
couchbase java 客户端代码
Couchbase 4.5.1-el6 自动化安装包,只需要稍作修改即可部署集群。
CouchBase 开发人员入门资料。 This manual provides information on how to build applications using Couchbase Server 2.0. The guide is designed to be used in conjunction with the language-specific guide...
couchbase的基本安装,多个数据库集群设置
couchbase-lite-java-core, Couchbase Lite核心库 是什么? Couchbase Lite Android库分为两个部分:这个模块没有对 Android API的依赖,而且在非Android环境中可用。couchbase-lite-android - 对 Android API有
如果要用c编写couchbase应用,就需参考这个api了
couchbase-python-client 是 Couchbase Server 的官方库。 标签:couchbase 分享 window._bd_share_config = { "common": { "bdSnsKey": {}, ...