简体   繁体   English

ArangoDB同步系统集合

[英]ArangoDB Synchronizing System Collections

I recently reformatted my comp and now I'm setting up my dev environment again, which includes ArangoDB. 我最近重新格式化了我的压缩程序,现在又重新设置了开发环境,其中包括ArangoDB。 I'm synchronizing data from our production db into my dev db for testing. 我正在将生产数据库中的数据同步到开发数据库中以进行测试。 This works fine except it doesn't sync the system collections, specifically the _users collection. 除不同步系统集合(特别是_users集合)外,此方法工作正常。 Is this possible to do, or will I have to recreate the users manually in my dev environment? 是否可以这样做,还是我必须在开发环境中手动重新创建用户?

I tried using the restrictType and restrictCollections arguments, but I must be doing something wrong because it returns: 我尝试使用strictType和restrictCollections参数,但是我必须做错了什么,因为它返回了:

{
    "error": true,
    "errorMessage": "invalid value for <restrictCollections> or <restrictType>",
    "code": 400,
    "errorNum": 400
}

I'm submitting this: (my actual data replaced for obvious security reasons) 我正在提交此文件:(出于明显的安全原因,替换了我的实际数据)

{
    "endpoint": "tcp://myserver.com:8529",
    "database": "mydb",
    "username": "myusername",
    "password": "mypassword",
    "restrictType":"include",
    "restrictCollections":"_users"
}

It works without the restrictType and restrictCollections keys. 它可以在没有strictType和restrictCollections键的情况下工作。 I think I have the syntax wrong. 我认为我的语法有误。 Any ideas? 有任何想法吗? thanks! 谢谢!

UPDATE: My syntax was wrong, I corrected it below, but unfortunately it still won't sync system databases. 更新:我的语法是错误的,我在下面更正了它,但是不幸的是它仍然不能同步系统数据库。 Is there a way to do this, or a better option? 有没有办法做到这一点,或者有更好的选择? Thanks! 谢谢!

{
    "endpoint": "tcp://myserver.com:8529",
    "database": "mydb",
    "username": "myusername",
    "password": "mypassword",
    "restrictType":"include",
    "restrictCollections":["_users"] //takes an array, not a list of strings
}

As already mentioned by @stj there is an implemented inclusion and exclusion of system collections for the replication in our devel branch: https://github.com/triAGENS/ArangoDB/commit/909b1300bd119af808ad3d6696617d824abc7c4f 正如@stj已经提到的那样,在我们的devel分支中已实现了inclusionexclusion复制的系统集合: https : //github.com/triAGENS/ArangoDB/commit/909b1300bd119af808ad3d6696617d824abc7c4f

This should also be in the 2.4 release which is planned for the end of the year. 这也应该在计划于今年年底发布的2.4版本中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM