Skip to content

Commit bebf7c8

Browse files
committed
no message
1 parent 78e20de commit bebf7c8

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ The latest synced binlog file and position are recorded in your info file which
5555
Or if you but want to load it from your own dumpfile. You should dump your table first as xml format(by adding ```-X```option to your mysqldump command)
5656

5757
then
58-
```python3 main.py path/to/your/config.yaml --fromfile```
58+
59+
```
60+
python3 main.py path/to/your/config.yaml --fromfile
61+
```
5962
to start sync, when xml sync is over, it will also start binlog sync.
6063

6164
## Deployment

sample.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
# The mysql database which you want to sync
12
mysql:
23
host: 127.0.0.1
34
port: 3306
45
user: foo
56
password: bar
67
db: mydb
78
table: mytable
9+
server_id: 1 # this should be unique
810

911
elastic:
1012
host: 127.0.0.1
@@ -13,30 +15,26 @@ elastic:
1315
index: article
1416
type: article
1517

16-
index_by:
17-
field:
18-
field_type:
19-
format:
20-
21-
type_by:
22-
field:
23-
field_type:
24-
format:
25-
18+
# If you want to map your column, put the column name as the value, and es field name as the key,
19+
# Particularly , if you set _id as follows, it will use myid column as the index doc's id, or ES will generate an id as default
2620
mapping:
27-
_id: uuid
21+
_id: myid
22+
es_field_name: mysql_column_name
2823

24+
# The log file's path
2925
logging:
3026
file: mylog.log
3127

28+
# The record file's path, which record the latest synced binlog file and position
3229
binlog_sync:
3330
record_file: binlog.info
3431

32+
# If you want to email notification when error occurs, fill this
3533
email:
36-
from:
34+
from: # the sender's email, uses smtp protocol
3735
host: smtp.example.com
3836
username: sender@example.com
39-
password: senderpass
40-
to:
37+
password: senderpassword
38+
to: # a list of notification recipients
4139
- first_recipient@example.com
4240
- second_recipient@example.com

0 commit comments

Comments
 (0)