租户恢复报错 no enough log for restore

【 使用环境 】测试环境
【 OB or 其他组件 】
【 使用版本 】4.2.1 → v4.3.1.0
【问题描述】
计划将正式环境的ob做备份, 然后再测试环境中还原,
备份正常。脚本如下:
ALTER SYSTEM SET LOG_ARCHIVE_DEST=‘LOCATION=file:///mnt/bak/ob/archive’;
ALTER SYSTEM ARCHIVELOG;
ALTER SYSTEM SET DATA_BACKUP_DEST=‘file:///mnt/bak/ob/data’;
ALTER SYSTEM BACKUP DATABASE;

但是还原时,报错了:no enough log for restore。还原环境版本5.7.25-OceanBase_CE-v4.3.1.0
还原脚本:
ALTER SYSTEM RESTORE tt_edu FROM ‘file:///mnt/bak/ob/data,file:///mnt/bak/ob/archive’ UNTIL TIME=‘2024-06-25 00:00:00’ WITH ‘pool_list=pool1&locality=F@zone1,F@zone2,F@zone3’;

详细报错信息:

[root@localhost log]# grep "ob_restore_util" rootservice.log | grep "ret=\-4018"
[2024-06-25 11:34:34.850058] WDIAG [RS.RESTORE] get_restore_log_piece_array_ (ob_restore_util.cpp:665) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2BA9-0-0] [lt=3][errcode=-4018] fail to get restore pieces(ret=-4018, restore_start_scn={val:0, v:0}, restore_end_scn={val:1719281003224678942, v:0})
[2024-06-25 11:34:34.850070] WDIAG [RS.RESTORE] get_restore_source (ob_restore_util.cpp:478) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2BA9-0-0] [lt=8][errcode=-4018] fail to get restore log piece array(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], restore_start_scn={val:0, v:0}, restore_scn={val:1719281003224678942, v:0})
[2024-06-25 11:34:34.850079] WDIAG [RS.RESTORE] fill_compat_backup_path (ob_restore_util.cpp:320) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2BA9-0-0] [lt=7][errcode=-4018] fail to get restore source(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:34:34.850093] WDIAG [RS.RESTORE] fill_backup_info_ (ob_restore_util.cpp:231) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2BA9-0-0] [lt=11][errcode=-4018] failed to fill compat backup path(ret=-4018, arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:34:34.850138] WDIAG [RS.RESTORE] fill_physical_restore_job (ob_restore_util.cpp:77) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2BA9-0-0] [lt=38][errcode=-4018] failed to fill backup info(ret=-4018, ret="OB_ENTRY_NOT_EXIST", arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1}, job={restore_key:{tenant_id:1, job_id:1}, initiator_job_id:0, initiator_tenant_id:1, tenant_id:0, backup_tenant_id:0, restore_type:{type:2}, status:0, comment:"", restore_start_ts:0, restore_scn:{val:1719281003224678942, v:0}, consistent_scn:{val:0, v:0}, post_data_version:0, source_cluster_version:0, source_data_version:0, restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", backup_dest:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", description:"", tenant_name:"tt_edu", pool_list:"pool1", locality:"F@zone1,F@zone2,F@zone3", primary_zone:"", compat_mode:-1, compatible:0, kms_info:"", kms_encrypt:false, concurrency:0, passwd_array:"", multi_restore_path_list:{backup_set_path_list:[], backup_piece_path_list:[], log_path_list:[]}, white_list:{table_items:[]}, recover_table:false})
[2024-06-25 11:41:24.122536] WDIAG [RS.RESTORE] get_restore_log_piece_array_ (ob_restore_util.cpp:665) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C01-0-0] [lt=3][errcode=-4018] fail to get restore pieces(ret=-4018, restore_start_scn={val:0, v:0}, restore_end_scn={val:1719281003224678942, v:0})
[2024-06-25 11:41:24.122545] WDIAG [RS.RESTORE] get_restore_source (ob_restore_util.cpp:478) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C01-0-0] [lt=8][errcode=-4018] fail to get restore log piece array(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], restore_start_scn={val:0, v:0}, restore_scn={val:1719281003224678942, v:0})
[2024-06-25 11:41:24.122556] WDIAG [RS.RESTORE] fill_compat_backup_path (ob_restore_util.cpp:320) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C01-0-0] [lt=11][errcode=-4018] fail to get restore source(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:41:24.122572] WDIAG [RS.RESTORE] fill_backup_info_ (ob_restore_util.cpp:231) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C01-0-0] [lt=15][errcode=-4018] failed to fill compat backup path(ret=-4018, arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:41:24.122602] WDIAG [RS.RESTORE] fill_physical_restore_job (ob_restore_util.cpp:77) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C01-0-0] [lt=22][errcode=-4018] failed to fill backup info(ret=-4018, ret="OB_ENTRY_NOT_EXIST", arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1}, job={restore_key:{tenant_id:1, job_id:2}, initiator_job_id:0, initiator_tenant_id:1, tenant_id:0, backup_tenant_id:0, restore_type:{type:2}, status:0, comment:"", restore_start_ts:0, restore_scn:{val:1719281003224678942, v:0}, consistent_scn:{val:0, v:0}, post_data_version:0, source_cluster_version:0, source_data_version:0, restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", backup_dest:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", description:"", tenant_name:"tt_edu", pool_list:"pool1", locality:"F@zone1,F@zone2,F@zone3", primary_zone:"", compat_mode:-1, compatible:0, kms_info:"", kms_encrypt:false, concurrency:0, passwd_array:"", multi_restore_path_list:{backup_set_path_list:[], backup_piece_path_list:[], log_path_list:[]}, white_list:{table_items:[]}, recover_table:false})
[2024-06-25 11:44:45.383527] WDIAG [RS.RESTORE] get_restore_log_piece_array_ (ob_restore_util.cpp:665) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C32-0-0] [lt=19][errcode=-4018] fail to get restore pieces(ret=-4018, restore_start_scn={val:0, v:0}, restore_end_scn={val:1719244800000000000, v:0})
[2024-06-25 11:44:45.383557] WDIAG [RS.RESTORE] get_restore_source (ob_restore_util.cpp:478) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C32-0-0] [lt=27][errcode=-4018] fail to get restore log piece array(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], restore_start_scn={val:0, v:0}, restore_scn={val:1719244800000000000, v:0})
[2024-06-25 11:44:45.383585] WDIAG [RS.RESTORE] fill_compat_backup_path (ob_restore_util.cpp:320) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C32-0-0] [lt=27][errcode=-4018] fail to get restore source(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:44:45.383629] WDIAG [RS.RESTORE] fill_backup_info_ (ob_restore_util.cpp:231) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C32-0-0] [lt=40][errcode=-4018] failed to fill compat backup path(ret=-4018, arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:44:45.383726] WDIAG [RS.RESTORE] fill_physical_restore_job (ob_restore_util.cpp:77) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C32-0-0] [lt=65][errcode=-4018] failed to fill backup info(ret=-4018, ret="OB_ENTRY_NOT_EXIST", arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1}, job={restore_key:{tenant_id:1, job_id:3}, initiator_job_id:0, initiator_tenant_id:1, tenant_id:0, backup_tenant_id:0, restore_type:{type:2}, status:0, comment:"", restore_start_ts:0, restore_scn:{val:1719244800000000000, v:0}, consistent_scn:{val:0, v:0}, post_data_version:0, source_cluster_version:0, source_data_version:0, restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", backup_dest:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", description:"", tenant_name:"tt_edu", pool_list:"pool1", locality:"F@zone1,F@zone2,F@zone3", primary_zone:"", compat_mode:-1, compatible:0, kms_info:"", kms_encrypt:false, concurrency:0, passwd_array:"", multi_restore_path_list:{backup_set_path_list:[], backup_piece_path_list:[], log_path_list:[]}, white_list:{table_items:[]}, recover_table:false})
[2024-06-25 11:45:26.600144] WDIAG [RS.RESTORE] get_restore_log_piece_array_ (ob_restore_util.cpp:665) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C40-0-0] [lt=3][errcode=-4018] fail to get restore pieces(ret=-4018, restore_start_scn={val:0, v:0}, restore_end_scn={val:1719244800000000000, v:0})
[2024-06-25 11:45:26.600150] WDIAG [RS.RESTORE] get_restore_source (ob_restore_util.cpp:478) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C40-0-0] [lt=5][errcode=-4018] fail to get restore log piece array(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], restore_start_scn={val:0, v:0}, restore_scn={val:1719244800000000000, v:0})
[2024-06-25 11:45:26.600156] WDIAG [RS.RESTORE] fill_compat_backup_path (ob_restore_util.cpp:320) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C40-0-0] [lt=6][errcode=-4018] fail to get restore source(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:45:26.600167] WDIAG [RS.RESTORE] fill_backup_info_ (ob_restore_util.cpp:231) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C40-0-0] [lt=10][errcode=-4018] failed to fill compat backup path(ret=-4018, arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:45:26.600195] WDIAG [RS.RESTORE] fill_physical_restore_job (ob_restore_util.cpp:77) [113787][DDLQueueTh0][T0][YB420A0A0A33-00061AADFC6E2C40-0-0] [lt=21][errcode=-4018] failed to fill backup info(ret=-4018, ret="OB_ENTRY_NOT_EXIST", arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1}, job={restore_key:{tenant_id:1, job_id:4}, initiator_job_id:0, initiator_tenant_id:1, tenant_id:0, backup_tenant_id:0, restore_type:{type:2}, status:0, comment:"", restore_start_ts:0, restore_scn:{val:1719244800000000000, v:0}, consistent_scn:{val:0, v:0}, post_data_version:0, source_cluster_version:0, source_data_version:0, restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", backup_dest:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", description:"", tenant_name:"tt_edu", pool_list:"pool1", locality:"F@zone1,F@zone2,F@zone3", primary_zone:"", compat_mode:-1, compatible:0, kms_info:"", kms_encrypt:false, concurrency:0, passwd_array:"", multi_restore_path_list:{backup_set_path_list:[], backup_piece_path_list:[], log_path_list:[]}, white_list:{table_items:[]}, recover_table:false})
[2024-06-25 11:52:50.495475] WDIAG [RS.RESTORE] get_restore_log_piece_array_ (ob_restore_util.cpp:665) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD281-0-0] [lt=5][errcode=-4018] fail to get restore pieces(ret=-4018, restore_start_scn={val:0, v:0}, restore_end_scn={val:1719244800000000000, v:0})
[2024-06-25 11:52:50.495484] WDIAG [RS.RESTORE] get_restore_source (ob_restore_util.cpp:478) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD281-0-0] [lt=6][errcode=-4018] fail to get restore log piece array(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], restore_start_scn={val:0, v:0}, restore_scn={val:1719244800000000000, v:0})
[2024-06-25 11:52:50.495495] WDIAG [RS.RESTORE] fill_compat_backup_path (ob_restore_util.cpp:320) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD281-0-0] [lt=9][errcode=-4018] fail to get restore source(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:52:50.495512] WDIAG [RS.RESTORE] fill_backup_info_ (ob_restore_util.cpp:231) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD281-0-0] [lt=14][errcode=-4018] failed to fill compat backup path(ret=-4018, arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:52:50.495551] WDIAG [RS.RESTORE] fill_physical_restore_job (ob_restore_util.cpp:77) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD281-0-0] [lt=25][errcode=-4018] failed to fill backup info(ret=-4018, ret="OB_ENTRY_NOT_EXIST", arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"2024-06-25 00:00:00", initiator_job_id:0, initiator_tenant_id:1}, job={restore_key:{tenant_id:1, job_id:1}, initiator_job_id:0, initiator_tenant_id:1, tenant_id:0, backup_tenant_id:0, restore_type:{type:2}, status:0, comment:"", restore_start_ts:0, restore_scn:{val:1719244800000000000, v:0}, consistent_scn:{val:0, v:0}, post_data_version:0, source_cluster_version:0, source_data_version:0, restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", backup_dest:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", description:"", tenant_name:"tt_edu", pool_list:"pool1", locality:"F@zone1,F@zone2,F@zone3", primary_zone:"", compat_mode:-1, compatible:0, kms_info:"", kms_encrypt:false, concurrency:0, passwd_array:"", multi_restore_path_list:{backup_set_path_list:[], backup_piece_path_list:[], log_path_list:[]}, white_list:{table_items:[]}, recover_table:false})
[2024-06-25 11:53:08.547179] WDIAG [RS.RESTORE] get_restore_log_piece_array_ (ob_restore_util.cpp:665) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD28F-0-0] [lt=2][errcode=-4018] fail to get restore pieces(ret=-4018, restore_start_scn={val:0, v:0}, restore_end_scn={val:1719281003224678942, v:0})
[2024-06-25 11:53:08.547188] WDIAG [RS.RESTORE] get_restore_source (ob_restore_util.cpp:478) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD28F-0-0] [lt=8][errcode=-4018] fail to get restore log piece array(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], restore_start_scn={val:0, v:0}, restore_scn={val:1719281003224678942, v:0})
[2024-06-25 11:53:08.547197] WDIAG [RS.RESTORE] fill_compat_backup_path (ob_restore_util.cpp:320) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD28F-0-0] [lt=9][errcode=-4018] fail to get restore source(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:53:08.547213] WDIAG [RS.RESTORE] fill_backup_info_ (ob_restore_util.cpp:231) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD28F-0-0] [lt=15][errcode=-4018] failed to fill compat backup path(ret=-4018, arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:53:08.547246] WDIAG [RS.RESTORE] fill_physical_restore_job (ob_restore_util.cpp:77) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD28F-0-0] [lt=22][errcode=-4018] failed to fill backup info(ret=-4018, ret="OB_ENTRY_NOT_EXIST", arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1}, job={restore_key:{tenant_id:1, job_id:2}, initiator_job_id:0, initiator_tenant_id:1, tenant_id:0, backup_tenant_id:0, restore_type:{type:2}, status:0, comment:"", restore_start_ts:0, restore_scn:{val:1719281003224678942, v:0}, consistent_scn:{val:0, v:0}, post_data_version:0, source_cluster_version:0, source_data_version:0, restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", backup_dest:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", description:"", tenant_name:"tt_edu", pool_list:"pool1", locality:"F@zone1,F@zone2,F@zone3", primary_zone:"", compat_mode:-1, compatible:0, kms_info:"", kms_encrypt:false, concurrency:0, passwd_array:"", multi_restore_path_list:{backup_set_path_list:[], backup_piece_path_list:[], log_path_list:[]}, white_list:{table_items:[]}, recover_table:false})
[2024-06-25 11:53:30.743881] WDIAG [RS.RESTORE] get_restore_log_piece_array_ (ob_restore_util.cpp:665) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD2A1-0-0] [lt=3][errcode=-4018] fail to get restore pieces(ret=-4018, restore_start_scn={val:0, v:0}, restore_end_scn={val:1719281003224678942, v:0})
[2024-06-25 11:53:30.743890] WDIAG [RS.RESTORE] get_restore_source (ob_restore_util.cpp:478) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD2A1-0-0] [lt=8][errcode=-4018] fail to get restore log piece array(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], restore_start_scn={val:0, v:0}, restore_scn={val:1719281003224678942, v:0})
[2024-06-25 11:53:30.743899] WDIAG [RS.RESTORE] fill_compat_backup_path (ob_restore_util.cpp:320) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD2A1-0-0] [lt=9][errcode=-4018] fail to get restore source(ret=-4018, tenant_path_array=["file:///mnt/bak/ob/ob_bak_192/data", "file:///mnt/bak/ob/ob_bak_192/archive"], arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:53:30.743915] WDIAG [RS.RESTORE] fill_backup_info_ (ob_restore_util.cpp:231) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD2A1-0-0] [lt=14][errcode=-4018] failed to fill compat backup path(ret=-4018, arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1})
[2024-06-25 11:53:30.743948] WDIAG [RS.RESTORE] fill_physical_restore_job (ob_restore_util.cpp:77) [111699][DDLQueueTh0][T0][YB420A0A0A33-00061BAED9BDD2A1-0-0] [lt=22][errcode=-4018] failed to fill backup info(ret=-4018, ret="OB_ENTRY_NOT_EXIST", arg={tenant_name:"tt_edu", uri:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", restore_scn:{val:18446744073709551615, v:3}, passwd_array:"", kms_info:"", table_items:[], multi_uri:"", with_restore_scn:false, encrypt_key:"", kms_uri:"", kms_encrypt_key:"", restore_timestamp:"", initiator_job_id:0, initiator_tenant_id:1}, job={restore_key:{tenant_id:1, job_id:3}, initiator_job_id:0, initiator_tenant_id:1, tenant_id:0, backup_tenant_id:0, restore_type:{type:2}, status:0, comment:"", restore_start_ts:0, restore_scn:{val:1719281003224678942, v:0}, consistent_scn:{val:0, v:0}, post_data_version:0, source_cluster_version:0, source_data_version:0, restore_option:"pool_list=pool1&locality=F@zone1,F@zone2,F@zone3", backup_dest:"file:///mnt/bak/ob/ob_bak_192/data,file:///mnt/bak/ob/ob_bak_192/archive", description:"", tenant_name:"tt_edu", pool_list:"pool1", locality:"F@zone1,F@zone2,F@zone3", primary_zone:"", compat_mode:-1, compatible:0, kms_info:"", kms_encrypt:false, concurrency:0, passwd_array:"", multi_restore_path_list:{backup_set_path_list:[], backup_piece_path_list:[], log_path_list:[]}, white_list:{table_items:[]}, recover_table:false})

该问题通常是由于用户在执行 ALTER SYSTEM RESTORE 语句时所指定的恢复终点不正确导致,需要确认在该恢复终点之前是否存在可用的备份集和日志归档,即所选的恢复终点可能未在可恢复区间内,有关可恢复区间的详细说明,请参见 物理恢复相关参数介绍 中的 timestamp 与 scn 选取约束

恢复的时候需要确取保 restore_timestamp 满足

restore_timestamp >= 备份集的 MIN_RESTORE_SCN_DISPLAY
select * from CDB_OB_BACKUP_SET_FILES;

restore_timestamp <= 日志归档的 CHECKPOINT_SCN_DISPLAY
select * from CDB_OB_ARCHIVELOG;

1 个赞

报错信息应该是超出可恢复范围了。
可以使用下面 sql 在原集群查一下备份文件可恢复时间范围,或者去掉恢复时间点位参数 UNTIL TIME=‘2024-06-25 00:00:00’,恢复到备份文件的最新时间。

SELECT * FROM (SELECT incarnation, tenant_id, backup_set_id, backup_type, path AS backup_dest, start_timestamp as start_time, end_timestamp as end_time, now(6) as check_time, status, comment, description, ‘CLUSTER’ as backup_level FROM ( SELECT incarnation, tenant_id, backup_set_id, backup_type, path, start_timestamp, end_timestamp, status, comment, description FROM CDB_OB_BACKUP_JOBS UNION SELECT incarnation, tenant_id, backup_set_id, backup_type, path, start_timestamp, end_timestamp, status, comment, description FROM CDB_OB_BACKUP_JOB_HISTORY ) WHERE tenant_id <> 1 ) where start_time >= ‘2024-06-10 00:00:00’ ORDER BY start_time DESC;

去掉UNTIL TIME也不行,还是报同样的错误。和版本有关系吗,从4.2.1备份出来的,在4.3.1中恢复

@秃蛙 麻烦看一下这个:

@大白熊 2楼的信息确认一下呢?

主要看看

restore_timestamp <= 日志归档的 CHECKPOINT_SCN_DISPLAY
select * from CDB_OB_ARCHIVELOG;

好的,我再试试

@和顺 报错:4179 restore from backup with unsupported data version is not allowed

这个是什么原因呢

你是把4.2.1 → v4.3.1.0上面恢复,这个报错意思是不支持,先进行版本升级至同一个版本,可以直接在ocp进行在线升级然后再数据恢复至测试环境

低版本向高版本也不支持吗?我看文档中说支持的啊

发一下对应时间的rootservice.log 日志附件看看,如果时间不好确认,这个问题看报错应该稳定能复现,等复现后将rs节点的对应时间的完整 rootservice.log 日志压缩上传一下。

select svr_ip from dba_ob_servers where with_rootserver=‘yes’;

压缩后大于10M了,取了最后2000行,请查看
new1.log (924.8 KB)
new2.log (1.0 MB)
new3.log (724.6 KB)

您好,问答区上传附件阈值大小的问题后续会优化的。

上面提供的日志看不出什么问题,麻烦将问题复现后,在钉钉上私信直接将完整日志发给我(和顺)看看。

[2024-06-26 14:58:59.215401] WDIAG [RS.RESTORE] check_backup_set_version_match_ (ob_restore_util.cpp:821) [43161][DDLQueueTh0][T0][YB420A0A0A35-00061BB2D0B3AA8F-0-0] [lt=20][errcode=-4179] restore from backup with unsupported data version(ret=-4179, ret=“OB_OP_NOT_ALLOW”, backup_file_desc.tenant_compatible_=17180000513, data_version=17180066048)
[2024-06-26 14:58:59.215409] WDIAG check_backup_set_version_match_ (ob_restore_util.cpp:822) [43161][DDLQueueTh0][T0][YB420A0A0A35-00061BB2D0B3AA8F-0-0] [lt=6][errcode=-4179] restore from backup with unsupported data version is not allowed

经过确认ob421的备份不支持恢复到ob431。感谢反馈这个问题,已经推文档同学在文档中添加说明。