我最近重新格式化了我的comp,现在我正在重新设置我的dev环境,其中包括arangodb。我正在将生产数据库中的数据同步到开发数据库中进行测试。这可以正常工作,除非它不同步系统集合,特别是用户集合。这是可能的,还是我必须在我的开发环境中手动重新创建用户?
我尝试使用restricttype和restrictcollections参数,但我一定做错了,因为它返回:
{
"error": true,
"errorMessage": "invalid value for <restrictCollections> or <restrictType>",
"code": 400,
"errorNum": 400
}
我正在提交这个:(我的实际数据因为明显的安全原因被替换了)
{
"endpoint": "tcp://myserver.com:8529",
"database": "mydb",
"username": "myusername",
"password": "mypassword",
"restrictType":"include",
"restrictCollections":"_users"
}
它在没有restricttype和restrictcollections键的情况下工作。我想我的语法错了。有什么想法吗?谢谢!
更新:我的语法错误,我在下面更正了它,但不幸的是它仍然不会同步系统数据库。有没有办法,或者更好的选择?谢谢!
{
"endpoint": "tcp://myserver.com:8529",
"database": "mydb",
"username": "myusername",
"password": "mypassword",
"restrictType":"include",
"restrictCollections":["_users"] //takes an array, not a list of strings
}
最佳答案
正如@stj已经提到的,我们的inclusion
分支中有一个用于复制的exclusion
和devel
系统集合:https://github.com/triAGENS/ArangoDB/commit/909b1300bd119af808ad3d6696617d824abc7c4f
这也应该出现在2.4版本中,该版本计划在今年年底发布。
关于database - ArangoDB同步系统集合,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27276676/