从0.10.0迁移Couchdb数据? [英] Migrate couchdb data from 0.10.0?
问题描述
对于Linux系统,我已经从benchdb 0.10.0备份了一个旧数据库,基本上是/ var / lib / couchdb目录的tar存档。
For a linux system, I've backed up an old database from couchdb 0.10.0, basically a tar archive of the /var/lib/couchdb directory.
将数据转换为沙发数据库1.0.1要求的格式的过程是什么?如果我只是将文件还原到其原始位置,则找不到它们。如果将它们放在/var/lib/couchdb/1.0.1中,则会出现以下错误:
What is the procedure to convert this data in the format required by couchdb 1.0.1? If I simply restore the files to their original location, they are not found. If I place them in /var/lib/couchdb/1.0.1, I get the following error:
{"error":"kill","reason":"{gen_server,call,\n [couch_server,\n {open,<<\"test\">>,\n [{user_ctx,\n {user_ctx,null,\n [<<\"_admin\">>],\n <<\"{couch_httpd_auth, default_authentication_handler}\">>}}]},\n infinity]}"}
(在这种情况下,数据库是名为test.couch的我将test.couch放在/var/lib/couchdb/1.0.1/test.couch中,并尝试通过URL打开它: http:// localhost:5984 / test / )
(In this case the database is named test.couch, I placed test.couch in /var/lib/couchdb/1.0.1/test.couch and tried to open it from the URL: http://localhost:5984/test/)
编辑:糟糕,解决方案非常明显。复制是正确的事情,但是我忘了更改权限。
edit: oops, the solution was pretty obvious. Copying was the right thing to do, but I forgot to change permissions.
因此,要还原备份的Sofadb数据库,所需要做的只是:
So, to restore a backed up couchdb database, all that is needed is:
sudo chown couchdb:couchdb backup/test.couch
sudo mv backup/test.couch /var/lib/couchdb/1.0.1
推荐答案
您可以尝试在0.10和1.0之间复制。 1台服务器,尽管我非常确定1.0.1可以读取0.10个数据库。沙发上有更多信息吗?
You could try replication between a 0.10 and 1.0.1 server although I'm pretty sure that 1.0.1 can read 0.10 databases. Is there more information in couch.log?
这篇关于从0.10.0迁移Couchdb数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!