From 7bdf501f8b838afe6ce9ae2c3fafcb9a2dedde70 Mon Sep 17 00:00:00 2001 From: seanlook Date: Sun, 7 Apr 2024 11:44:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(mysql):=20dbbackup=20=E7=89=A9=E7=90=86?= =?UTF-8?q?=E5=A4=87=E4=BB=BD=E5=8E=BB=E6=8E=89=20safe-slave=20=E9=80=89?= =?UTF-8?q?=E9=A1=B9=20#3832?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/migrations/000015_rediscomm_data.up.sql | 5 +++++ .../assets/migrations/000019_tendbcluster_data.up.sql | 2 -- .../assets/migrations/000040_tendbcomm_data.down.sql | 2 ++ ...common_data.up.sql => 000040_tendbcomm_data.up.sql} | 10 ++++++++-- .../assets/migrations/000040_tendbcommon_data.down.sql | 2 -- .../pkg/src/backupexe/dumper_physical.go | 3 ++- 6 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 dbm-services/common/db-config/assets/migrations/000040_tendbcomm_data.down.sql rename dbm-services/common/db-config/assets/migrations/{000040_tendbcommon_data.up.sql => 000040_tendbcomm_data.up.sql} (52%) delete mode 100644 dbm-services/common/db-config/assets/migrations/000040_tendbcommon_data.down.sql diff --git a/dbm-services/common/db-config/assets/migrations/000015_rediscomm_data.up.sql b/dbm-services/common/db-config/assets/migrations/000015_rediscomm_data.up.sql index 980f0dd28c..ba0c439594 100644 --- a/dbm-services/common/db-config/assets/migrations/000015_rediscomm_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000015_rediscomm_data.up.sql @@ -32,6 +32,7 @@ INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_type_lc`, `conf_file_lc`, `level_names`, `level_versioned`, `conf_name_validate`, `conf_value_validate`, `value_type_strict`, `namespace_info`, `version_keep_limit`, `version_keep_days`, `conf_name_order`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES (172,'rediscomm','config','heartbeat','配置','心跳相关的配置','pub,plat,app,module,cluster','cluster',1,1,0,'Tendisplus',5,365,0,'心跳相关的配置','2023-02-28 15:01:19','2023-04-06 11:59:44',''); INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_type_lc`, `conf_file_lc`, `level_names`, `level_versioned`, `conf_name_validate`, `conf_value_validate`, `value_type_strict`, `namespace_info`, `version_keep_limit`, `version_keep_days`, `conf_name_order`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES (125,'rediscomm','config','hotkey','大key相关配置','hotkey','pub,plat,app,module,cluster','cluster',1,1,0,'rediscomm',5,365,0,'大key相关配置','2022-11-29 14:51:54','2023-06-30 17:29:23',''); INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_type_lc`, `conf_file_lc`, `level_names`, `level_versioned`, `conf_name_validate`, `conf_value_validate`, `value_type_strict`, `namespace_info`, `version_keep_limit`, `version_keep_days`, `conf_name_order`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES (127,'rediscomm','config','keymod','key模式相关配置','keymod','pub,plat,app,module,cluster','cluster',1,1,0,'rediscomm',5,365,0,'key模式相关配置','2022-11-29 14:51:54','2023-06-30 17:29:16',''); +INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_type_lc`, `conf_file_lc`, `level_names`, `level_versioned`, `conf_name_validate`, `conf_value_validate`, `value_type_strict`, `namespace_info`, `version_keep_limit`, `version_keep_days`, `conf_name_order`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES (338,'rediscomm','config','maxmemory_set','配置','maxmemory设置的配置','pub,plat,app,module,cluster','cluster',1,1,0,'tendisCache',5,365,0,NULL,'2024-03-27 18:54:28','2024-03-27 18:54:28',''); INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_type_lc`, `conf_file_lc`, `level_names`, `level_versioned`, `conf_name_validate`, `conf_value_validate`, `value_type_strict`, `namespace_info`, `version_keep_limit`, `version_keep_days`, `conf_name_order`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES (173,'rediscomm','config','monitor','配置','监控相关的配置','pub,plat,app,module,cluster','cluster',1,1,0,'Tendisplus',5,365,0,'监控相关的配置','2023-02-28 15:01:19','2023-04-06 11:59:44',''); /*!50112 SET @disable_bulk_load = IF (@is_rocksdb_supported, 'SET SESSION rocksdb_bulk_load = @old_rocksdb_bulk_load', 'SET @dummy_rocksdb_bulk_load = 0') */; /*!50112 PREPARE s FROM @disable_bulk_load */; @@ -95,6 +96,10 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (12975,'rediscomm','config','hotkey','duration_seconds','int','30',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-11-29 15:00:02','2022-11-29 17:08:30',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (13938,'rediscomm','config','hotkey','top_count','int','10','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-02-28 15:01:19','2023-02-28 15:01:19',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (12974,'rediscomm','config','hotkye','top_count','int','10',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-11-29 15:00:02','2022-11-29 17:08:30',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22906,'rediscomm','config','maxmemory_set','bk_biz_id_blacklist','STRING','','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-03-27 18:54:28','2024-03-28 11:36:36',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22907,'rediscomm','config','maxmemory_set','domains_blacklist','STRING','','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-03-27 18:54:28','2024-03-27 18:54:28',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22905,'rediscomm','config','maxmemory_set','master_used_memory_change_percent','INT','20','[0,1000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-03-27 18:54:28','2024-03-27 18:54:28',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22904,'rediscomm','config','maxmemory_set','master_used_memory_change_threshold','STRING','200MB','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-03-27 18:54:28','2024-03-27 18:54:28',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15965,'rediscomm','config','monitor','bkmonitor_event_data_id','INT','542898','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-04-06 11:54:33','2023-04-06 11:54:33',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15966,'rediscomm','config','monitor','bkmonitor_event_token','STRING','8108b6fe1c8343ca8d6538652242d439','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-04-06 11:54:33','2023-04-06 11:54:33',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15968,'rediscomm','config','monitor','bkmonitor_metirc_token','STRING','4301571541434e1091cb70af6164ee67','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-04-06 11:54:33','2023-04-06 11:54:33',0); diff --git a/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql b/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql index 5b007e1307..d695e19ddc 100644 --- a/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000019_tendbcluster_data.up.sql @@ -1084,9 +1084,7 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15503,'tendbcluster','dbconf','Spider-1','mysqld.relay_log_recovery','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2023-04-19 15:10:13',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15508,'tendbcluster','dbconf','Spider-1','mysqld.server_id','STRING','{{.Mysqld.ServerId}}',NULL,'',2,0,0,0,1,'{{mysqld.server_id}}',NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2023-03-28 18:01:00',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15510,'tendbcluster','dbconf','Spider-1','mysqld.skip-name-resolve','STRING','true','true | false','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2023-03-09 18:37:22',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15511,'tendbcluster','dbconf','Spider-1','mysqld.slave_compressed_protocol','INT','1','1 | 0','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2023-04-19 15:11:00',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15512,'tendbcluster','dbconf','Spider-1','mysqld.slave_exec_mode','STRING','STRICT','|STRICT|IDEMPOTENT','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2023-04-19 15:10:13',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15514,'tendbcluster','dbconf','Spider-1','mysqld.slave_parallel_workers','INT','0','0| 1| 2| 4| 8| 16| 32| 64','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2024-03-26 10:25:20',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15515,'tendbcluster','dbconf','Spider-1','mysqld.slow_launch_time','INT','2','[1,10]','RANGE',-1,0,0,0,0,NULL,NULL,NULL,-1,NULL,'If creating a thread takes longer than this many seconds, the server increments the Slow_launch_threads status variable','2023-03-09 17:55:11','2023-03-09 17:55:11',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15516,'tendbcluster','dbconf','Spider-1','mysqld.slow_query_log','STRING','ON','ON | OFF','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2023-04-17 15:00:55',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (15517,'tendbcluster','dbconf','Spider-1','mysqld.slow_query_log_file','STRING','{{.Mysqld.Logdir}}/slow-query.log',NULL,'',2,0,0,0,1,'{{mysqld.slow_query_log_file}}',NULL,NULL,-1,NULL,NULL,'2023-03-09 17:55:11','2023-03-28 18:00:48',0); diff --git a/dbm-services/common/db-config/assets/migrations/000040_tendbcomm_data.down.sql b/dbm-services/common/db-config/assets/migrations/000040_tendbcomm_data.down.sql new file mode 100644 index 0000000000..dc8b3bbf24 --- /dev/null +++ b/dbm-services/common/db-config/assets/migrations/000040_tendbcomm_data.down.sql @@ -0,0 +1,2 @@ +DELETE FROM tb_config_file_def WHERE namespace='tendbcomm'; +DELETE FROM tb_config_name_def WHERE namespace='tendbcomm' AND (flag_encrypt!=1 or value_default like '{{%'); diff --git a/dbm-services/common/db-config/assets/migrations/000040_tendbcommon_data.up.sql b/dbm-services/common/db-config/assets/migrations/000040_tendbcomm_data.up.sql similarity index 52% rename from dbm-services/common/db-config/assets/migrations/000040_tendbcommon_data.up.sql rename to dbm-services/common/db-config/assets/migrations/000040_tendbcomm_data.up.sql index 73972228ee..e51cc2cb18 100644 --- a/dbm-services/common/db-config/assets/migrations/000040_tendbcommon_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000040_tendbcomm_data.up.sql @@ -22,8 +22,9 @@ -- -- Dumping data for table `tb_config_file_def` -- --- WHERE: namespace='tendbcommon' +-- WHERE: namespace='tendbcomm' +INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_type_lc`, `conf_file_lc`, `level_names`, `level_versioned`, `conf_name_validate`, `conf_value_validate`, `value_type_strict`, `namespace_info`, `version_keep_limit`, `version_keep_days`, `conf_name_order`, `description`, `created_at`, `updated_at`, `updated_by`) VALUES (335,'tendbcomm','backup','backup_client','配置','备份客户端相关的配置','plat,app,bk_cloud_id,city',NULL,1,1,0,NULL,5,365,0,NULL,'2024-03-25 16:35:58','2024-03-25 16:59:32',NULL); /*!50112 SET @disable_bulk_load = IF (@is_rocksdb_supported, 'SET SESSION rocksdb_bulk_load = @old_rocksdb_bulk_load', 'SET @dummy_rocksdb_bulk_load = 0') */; /*!50112 PREPARE s FROM @disable_bulk_load */; /*!50112 EXECUTE s */; @@ -59,8 +60,13 @@ -- -- Dumping data for table `tb_config_name_def` -- --- WHERE: namespace='tendbcommon' AND (flag_encrypt!=1 or value_default like '{{%') +-- WHERE: namespace='tendbcomm' AND (flag_encrypt!=1 or value_default like '{{%') +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22885,'tendbcomm','backup','backup_client','binlogbackup.keep_days','INT','15','[1, 60]','RANGE',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-11-29 15:00:02','2024-03-25 16:41:50',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22888,'tendbcomm','backup','backup_client','binlogbackup.keep_storage_tag','STRING','INCREMENT_BACKUP','','',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-11-29 15:00:02','2024-03-25 16:52:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22884,'tendbcomm','backup','backup_client','default_storage_type','STRING','','hdfs | cos |','ENUM',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-11-29 15:00:02','2022-11-29 17:08:30',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22886,'tendbcomm','backup','backup_client','fullbackup.keep_days','INT','25','[1, 60]','RANGE',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-11-29 15:00:02','2024-03-25 16:41:03',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (22887,'tendbcomm','backup','backup_client','fullbackup.keep_storage_tag','STRING','MYSQL_FULL_BACKUP','','',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,NULL,'2022-11-29 15:00:02','2024-03-26 10:26:25',0); /*!50112 SET @disable_bulk_load = IF (@is_rocksdb_supported, 'SET SESSION rocksdb_bulk_load = @old_rocksdb_bulk_load', 'SET @dummy_rocksdb_bulk_load = 0') */; /*!50112 PREPARE s FROM @disable_bulk_load */; /*!50112 EXECUTE s */; diff --git a/dbm-services/common/db-config/assets/migrations/000040_tendbcommon_data.down.sql b/dbm-services/common/db-config/assets/migrations/000040_tendbcommon_data.down.sql deleted file mode 100644 index 2b224f1c61..0000000000 --- a/dbm-services/common/db-config/assets/migrations/000040_tendbcommon_data.down.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM tb_config_file_def WHERE namespace='tendbcommon'; -DELETE FROM tb_config_name_def WHERE namespace='tendbcommon' AND (flag_encrypt!=1 or value_default like '{{%'); diff --git a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/backupexe/dumper_physical.go b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/backupexe/dumper_physical.go index 10c417b1d5..aef5a30350 100644 --- a/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/backupexe/dumper_physical.go +++ b/dbm-services/mysql/db-tools/mysql-dbbackup/pkg/src/backupexe/dumper_physical.go @@ -113,7 +113,8 @@ func (p *PhysicalDumper) Execute(enableTimeOut bool) error { if strings.ToLower(p.cnf.Public.MysqlRole) == cst.RoleSlave { args = append(args, []string{ - "--slave-info", "--safe-slave-backup", + "--slave-info", + //"--safe-slave-backup", }...) }