从Windows到Linux传输CouchDB .couch文件 [英] Transferring CouchDB .couch files from Windows to Linux
问题描述
我目前正在研究CouchDB项目,最近决定在我计划在Linux服务器上进行部署时切换到Linux环境进行开发。
Am currently working on a CouchDB project, and have recently decided to switch to a Linux environment for development as I plan to deploy on a Linux server.
希望直接从- Program Files / Apache Software Foundation / CouchDB-1-1-1 / var / lib / couchdb 复制我的.couch文件,并将其直接粘贴到我认为应该是的位置- var / lib / couchdb -但是,每次尝试访问 var / lib / couchdb 时,我总是遇到文件/文件夹权限错误。
I was hoping to copy over my .couch files straight from - Program Files/Apache Software Foundation/CouchDB-1-1-1/var/lib/couchdb - and paste them directly into what I guess should be - var/lib/couchdb - But I keep running into file/folder permission errors each time I try to access var/lib/couchdb.
是否甚至可以按照我的设想传输.couch文件?
Is it even possible to transfer .couch files in the way I envisage?
...
更新-根据Dominic的评论,我设法应用了下面答案中找到的修复程序。
Update - Follwing up on Dominic's comments, I managed to apply the fix found in the answer below.
推荐答案
经过一些调查工作,我发现它是一个权限错误,正像多米尼克·巴恩斯(Dominic Barnes)在评论中所建议的那样……
After some investigative work, I found it to be a permissions error, exactly as Dominic Barnes had suggested in the comments...
问题在此也进行了讨论-使用ouchdb进行分阶段设置
The issue is also discussed here - Staging setup with couchdb
要解决此问题,我先运行了;
To fix it, I first ran;
sudo chmod -R 755 var/lib/couchdb
我可能也已更改了相关父文件夹的权限。然后,我可以将.couch文件复制到var / lib / couchdb / COUCH-VERSION-NUMBER。之后,我不得不使用chmod为新复制的文件设置有利的写权限,而且还必须运行:
I may have also changed the permissions on the relevant parent folders too. I was then able to copy my .couch files into var/lib/couchdb/COUCH-VERSION-NUMBER. After doing that, I then had to use chmod to set favourable write permissions on the newly copied files, but also had to run:
sudo chown couchdb var/lib/couchdb/COUCH-VERSION-NUMBER/
打开这些文件到沙发床安装设置供内部使用的用户组( couchdb组)(我认为...)。之后,我重新启动了ouchdb,并强制其停止:
To open those files up to the user group (the "couchdb" group) that the couchdb installation sets up for internal use (I think...). After that, I restarted couchdb, forcing it to stop with:
ps -U couchdb -o pid= | xargs kill -9
并重新启动:
/etc/init.d/couchdb start
之后那,一切似乎都按预期工作。
希望能帮助其他遇到相同问题的人。
After that, everything seemed to work as expected. Hope that helps anyone else running into the same problem.
这篇关于从Windows到Linux传输CouchDB .couch文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!