forked from caosiyang/py-mongo-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathes_conf.toml
48 lines (41 loc) · 926 Bytes
/
es_conf.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# source config
[src]
hosts = "127.0.0.1:27017" # hostportstr of a member of replica set
authdb = "admin"
username = "yourusername"
password = "yourpassword"
# destination config
[dst]
type = "es"
hosts = [
"your_es_host1:9200",
"your_es_host2:9200",
"your_es_host3:9200",
"your_es_host4:9200",
"your_es_host5:9200"
]
# sync config
[sync]
# sync database "test0"
[[sync.dbs]]
db = "test0"
# sync database (test1 => test11)
[[sync.dbs]]
db = "test1"
rename_db = "test11"
# sync collections (test2.coll0 => test22.coll0, test2.coll1 => test22.coll1)
[[sync.dbs]]
db = "test2"
rename_db = "test22"
colls = [ "coll0", "coll1" ]
# sync collections with specfied fields
[[sync.dbs]]
db = "test3"
rename_db = "test33"
colls = [
{ coll = "coll2", fields = [ "f0", "f1" ] },
{ coll = "coll3", fields = [ "f2", "f3" ] }
]
# log config
[log]
filepath = "sync.log" # write to stdout if empty or not set