CouchDB备份和克隆数据库

CouchDB备份和克隆数据库

本文介绍了CouchDB备份和克隆数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在为CMS-ish应用程序寻找CouchdDB.备份生产数据库有哪些常见的模式,最佳实践和工作流建议?

We're looking at CouchdDB for a CMS-ish application. What are some common patterns, best practices and workflow advice surrounding backing up our production database?

我对克隆数据库以用于开发和测试的过程特别感兴趣.

I'm particularly interested in the process of cloning the database for use in development and testing.

仅从正在运行的实例下复制磁盘上的文件就足够了吗?您可以在两个实时运行的实例之间克隆数据库数据吗?

Is it sufficient to just copy the files on disk out from under a live running instance? Can you clone database data between two live running instances?

对使用的技术的建议和描述将不胜感激.

Advice and description of the techniques you use will be greatly appreciated.

推荐答案

CouchDB支持复制,因此只需复制到CouchDB的另一个实例并从那里备份,避免打扰您将更改写入何处.

CouchDB supports replication, so just replicate to another instance of CouchDB and backup from there, avoiding disturbing where you write changes to.

http://wiki.apache.org/couchdb/FrequentlyAskedQuestions#how_replication

您从字面上发送POST请求到您的CouchDB实例,告诉它要复制到何处,并且它可以工作(tm)

You literally send a POST request to your CouchDB instance telling it where to replicate to, and it Works(tm)

只要您可以接受I/O命中,就可以从正在运行的数据库下cp文件.

You can just cp out the files from under the running database as long as you can accept the I/O hit.

这篇关于CouchDB备份和克隆数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 12:53