-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yaml.sample
120 lines (98 loc) · 3.31 KB
/
config.yaml.sample
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Mysql connection options
database:
# Db name to create a dump from
databaseName: "my_database"
# Sample tcp connection via host:port
net: tcp
# DB host connect to
hostname: "localhost"
# Mysql user name
user: "user"
# Mysql password
password: "secret"
# Mysql port
port: "3306"
# Sample socket connection via local socket file
net: unix
socket: /run/mysql/mysql.sock
user: "user"
password: "password"
# Resulting file options
output:
# %s will be a database name
# Uses time.Time.Format (https://golang.org/pkg/time/#Time.Format)
fileNameFormat: "%s-2006-01-02T150405"
# directory to store dump into
directory: "./dumps"
# Table processing options
tables:
# Tables listed in this section are dumped as is
keep:
- table_name_to_keep_1
- table_name_to_keep_2
- table_name_to_keep_3
# Tables listed in this section are completely excluded from the dump
ignore:
- table_name_to_ignore_1
- table_name_to_ignore_2
- table_name_to_ignore_3
# Tables listed in this section are dropped and recreated in the dump to contain no data
truncate:
- table_name_to_truncate_1
- table_name_to_truncate_2
- table_name_to_truncate_3
# Tables listed in this section are going to have obfuscated data in some fields
obfuscate:
# Here is an obfuscation in action. Table name is user_data
user_data:
# Field name is user_first_name - a random first name will be dumped instead of actual data
user_first_name:
type: first_name
# Field name is user_last_name - a random last name will be dumped instead of actual data
user_last_name:
type: last_name
# Field name is user_full_name - a random full name will be dumped instead of actual data
user_full_name:
type: name
# Field name is user_phone - a random phone number name will be dumped instead of actual data
user_phone:
type: phone
# Field name is user_email - a random email name will be dumped instead of actual data
user_email:
type: email
# 'pet_name' field in the 'user_data' table will have production data as it has no type specified
# The same applies to any unlisted field - it will have a production data inside
pet_name:
# Obfuscation options for another database table called 'addresses'
addresses:
zip:
type: zip_code
street:
type: street_address
city:
type: city
full_address:
type: address
# Another obfuscated table with the name 'table_name_5'
table_name_5:
# type:lorem will generate a random sentence and dump it instead of real data
secret_question:
type: lorem
# type:string will generate a random string of a given length instead of actual data
answer_to_secret_question:
type: string
length: 10
# type:fixed means that all dumped entries will have the same user_cc_data value
# Also shows how to escape qoutes properly
user_cc_data:
type: fixed
string: "{\"cardNumber\":\"XXXX1234\",\"cardType\":\"VI\",\"cardExpYear\":\"2022\",\"cardExpMonth\":\"2\"}"
# And some more data types in
extra_data:
company_name:
type: company
company_website:
type: url
ceo_primary_ip:
type: ipv4
# That's all we have so far