34 lines
1.9 KiB
JSON
34 lines
1.9 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "dbbackup_jobs",
|
|
"title": "数据库备份任务",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "任务ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "cluster_id", "title": "所属集群", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "job_name", "title": "任务名称", "type": "str", "length": 128, "nullable": "no"},
|
|
{"name": "db_name", "title": "数据库名", "type": "str", "length": 128, "nullable": "no"},
|
|
{"name": "backup_type", "title": "备份类型", "type": "str", "length": 16, "nullable": "no", "default": "full"},
|
|
{"name": "schedule", "title": "调度(cron表达式)", "type": "str", "length": 64},
|
|
{"name": "retention_days", "title": "保留天数", "type": "int", "nullable": "no", "default": "7"},
|
|
{"name": "storage_path", "title": "备份存储路径", "type": "str", "length": 512, "nullable": "no"},
|
|
{"name": "compress", "title": "压缩", "type": "str", "length": 1, "nullable": "no", "default": "1"},
|
|
{"name": "enabled", "title": "启用", "type": "str", "length": 1, "nullable": "no", "default": "1"},
|
|
{"name": "last_run_at", "title": "上次执行时间", "type": "datetime"},
|
|
{"name": "created_at", "title": "创建时间", "type": "datetime"},
|
|
{"name": "updated_at", "title": "更新时间", "type": "datetime"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_dbbak_job_cluster", "idxtype": "index", "idxfields": ["cluster_id"]},
|
|
{"name": "idx_dbbak_job_name", "idxtype": "index", "idxfields": ["db_name"]}
|
|
],
|
|
"codes": [
|
|
{"field": "backup_type", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='backup_type'"},
|
|
{"field": "cluster_id", "table": "clusters", "valuefield": "id", "textfield": "name"}
|
|
]
|
|
}
|