Repository navigation
Expand file tree
/
Copy pathdbtool.example.json
More file actions
109 lines (104 loc) · 2.64 KB
/
Copy pathdbtool.example.json
File metadata and controls
109 lines (104 loc) · 2.64 KB
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
{
"env_file": "/etc/dbtool/dbtool.env",
"defaults": {
"backup_dir": "/backup/db",
"log_file": "/var/log/dbtool.log",
"retention_days": 14,
"retention_min_keep": 3,
"compression": "zstd",
"pg_compress_level": 6,
"format": "custom",
"jobs": 4,
"docker": "auto",
"docker_network": "host",
"timeout": 7200,
"timestamp_format": "%Y%m%d-%H%M%S",
"verify": "full",
"include_globals": true,
"lock": true
},
"s3": {
"enabled": false,
"provider": "mc",
"alias": "minio",
"bucket": "db-backups",
"prefix": "db01"
},
"notify": {
"webhook": ""
},
"databases": [
{
"name": "app_dev",
"url": "postgresql+asyncpg://app_user:${APP_PG_PASSWORD}@${DB_HOST}:5432/app_dev"
},
{
"name": "app_prod",
"engine": "postgres",
"host": "db-primary.example.com",
"port": 5432,
"user": "app_user",
"password_env": "APP_PG_PASSWORD",
"database": "app_prod",
"sslmode": "prefer",
"format": "custom",
"no_owner": true,
"exclude_tables": ["audit_log", "celery_taskmeta"],
"dump_args": ["--no-privileges"]
},
{
"name": "analytics_pg",
"engine": "postgres",
"host": "db-analytics.example.com",
"port": 5432,
"user": "postgres",
"password_file": "/etc/dbtool/analytics.pass",
"database": "analytics",
"format": "directory",
"jobs": 6
},
{
"name": "crm_mysql",
"engine": "mysql",
"host": "db-primary.example.com",
"port": 3306,
"user": "crm_user",
"password": "${CRM_DB_PASSWORD}",
"database": "crm_mysql",
"dump_args": ["--single-transaction", "--routines", "--triggers", "--events"]
},
{
"name": "legacy_mysql",
"engine": "mysql",
"url": "mysql+pymysql://root:${LEGACY_MYSQL_PASSWORD}@db-legacy.example.com:3307/legacy_app",
"enabled": false
}
],
"targets": {
"staging_pg": {
"engine": "postgres",
"host": "db-analytics.example.com",
"port": 5432,
"user": "postgres",
"password": "${STAGING_PG_PASSWORD}",
"database": "app_dev",
"create": true,
"clean": false,
"restore_args": ["--no-owner", "--no-privileges"]
},
"new_server_pg": {
"engine": "postgres",
"url": "postgresql://postgres:${NEW_PG_PASSWORD}@db-new.example.com:5432/app_prod",
"create": true
},
"new_server_mysql": {
"engine": "mysql",
"host": "db-new.example.com",
"port": 3306,
"user": "root",
"password": "${NEW_MYSQL_PASSWORD}",
"database": "crm_mysql",
"create": true
}
}
}