oceanbase4.3.5全量备份还原的命令

不应该没有restore记录啊,是同一个环境吗?你上面查到upgrade那个查的哪个视图?

SELECT * FROM oceanbase.CDB_OB_RESTORE_PROGRESS\G;


是因为还没有restore完成,history视图还没记录,最新的observer.log和rootservice.log 发下吧

observer.log (45 MB)

roots log太大了我改一下名字传

学习一下。

这个租户,数据量大概各是多少?

我看原来的库里,大概30G左右

学习了!

新集群使用obdiag巡检下
obdiag check run

https://www.oceanbase.com/docs/common-obdiag-cn-1000000003607664

1 个赞

应该是数据恢复到的时间点

1 个赞

obdiag_check_report_observer_2025-08-07-15-52-29.7z (4.3 KB)

收藏

有许多critical和warning,如果上生产需要修复,可能和这次restore没有直接关系,我再看下日志

critical-tasks-report                                                                                                         |
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|            task            | task_report                                                                                                                                                                                             |
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| network.TCP-retransmission | [critical] [local] tsar is not installed. we can not check tcp retransmission.                                                                                                                          |
|   network.network_speed    | [critical] [cluster:ynjtest] check network_name is lo , can not get real speed                                                                                                                          |
|  disk.clog_abnormal_file   | [critical] [local] Users are not allowed to modify or create in the clog folder, It will be causing observer startup failure. Files need be checked: /bin/bash: 行 2: /home/clog/clog/: Is a directory  |
| cluster.data_path_settings | [critical] [local] ip:127.0.0.1 ,log_dir_path: /home/clog/                                                                                                                                              |
|                            | /home/clog/clog file_system is not xfs or ext4.                                                                                                                                                         |
|   cluster.task_opt_stat    | [critical] [cluster:ynjtest] The collection of statistical information related to tenants has issues.. Please check the tenant_ids: 1004                                                                |
| tenant.tenant_min_resource | [critical] [cluster:ynjtest] there tenant resource pool configuration is less than 2C4G, please check it. tenant_id: 1                                                                                  |
|        bugs.bug_469        | [critical] [local] glibc version need less 2.34. This may cause observer crash. More information: https://github.com/oceanbase/obdiag/issues/469                                                       |
| system.instruction_set_avx | [critical] CPU on local does not support AVX instruction set. if you want to use observer, please upgrade the observer version to '4.2.5.6 or later' or '4.3.5.4 or later' or '4.4.1.0 or later'        |
|   system.python_version    | [critical] node: local python is not existed                                                                                                                                                            |
|    system.core_pattern     | [critical] [local] kernel.core_pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h , is not recommended for configuring functions other than the specified core path                       |
+----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

好的,感谢。

show global variables.

activate_all_roles_on_login OFF
autocommit ON
automatic_sp_privileges 1
auto_generate_certs ON
auto_increment_cache_size 1000000
auto_increment_increment 1
auto_increment_offset 1
avoid_temporal_upgrade OFF
big_tables OFF
binlog_cache_size 32768
binlog_checksum CRC32
binlog_direct_non_transactional_updates 0
binlog_error_action ABORT_SERVER
binlog_format ROW
binlog_group_commit_sync_delay 0
binlog_group_commit_sync_no_delay_count 0
binlog_max_flush_queue_time 0
binlog_order_commits 1
binlog_rows_query_log_events OFF
binlog_row_image FULL
binlog_stmt_cache_size 32768
binlog_transaction_dependency_history_size 25000
binlog_transaction_dependency_tracking COMMIT_ORDER
block_encryption_mode aes-128-ecb
cardinality_estimation_model PARTIAL
character_sets_dir
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database utf8mb4
character_set_filesystem binary
character_set_results utf8mb4
character_set_server utf8mb4
character_set_system utf8mb4
check_proxy_users OFF
collation_connection utf8mb4_general_ci
collation_database utf8mb4_general_ci
collation_server utf8mb4_general_ci
completion_type NO_CHAIN
concurrent_insert AUTO
connection_control_failed_connections_threshold 0
connection_control_max_connection_delay 2147483647
connection_control_min_connection_delay 1000
connect_timeout 10
cte_max_recursion_depth 1000
cursor_sharing FORCE
datadir /home/obdata
datetime_format %Y-%m-%d %H:%i:%s
date_format %Y-%m-%d
debug d:t:i:o,/tmp/mysqld.trace
default_authentication_plugin mysql_native_password
default_collation_for_utf8mb4 utf8mb4_general_ci
default_password_lifetime 0
default_storage_engine OceanBase
default_tmp_storage_engine InnoDB
default_week_format 0
delayed_insert_limit 100
delayed_insert_timeout 300
delayed_queue_size 1000
delay_key_write ON
disabled_storage_engines
disconnect_on_expired_password ON
div_precision_increment 4
enforce_gtid_consistency OFF
eq_range_index_dive_limit 200
error_on_overlap_time OFF
expire_logs_days 0
explicit_defaults_for_timestamp ON
flush OFF
flush_time 0
foreign_key_checks ON
ft_stopword_file built-in
general_log OFF
group_concat_max_len 1024
group_replication_allow_local_disjoint_gtids_join OFF
group_replication_allow_local_lower_version_join OFF
group_replication_auto_increment_increment 7
group_replication_bootstrap_group OFF
group_replication_components_stop_timeout 31536000
group_replication_compression_threshold 1000000
group_replication_enforce_update_everywhere_checks OFF
group_replication_exit_state_action READ_ONLY
group_replication_flow_control_applier_threshold 25000
group_replication_flow_control_certifier_threshold 25000
group_replication_flow_control_mode QUOTA
group_replication_force_members
group_replication_group_name
group_replication_group_seeds
group_replication_gtid_assignment_block_size
group_replication_ip_whitelist AUTOMATIC
group_replication_local_address
group_replication_member_weight 50
group_replication_poll_spin_loops 0
group_replication_recovery_complete_at TRANSACTIONS_APPLIED
group_replication_recovery_reconnect_interval 60
group_replication_recovery_retry_count 10
group_replication_recovery_ssl_ca
group_replication_recovery_ssl_capath
group_replication_recovery_ssl_cert
group_replication_recovery_ssl_cipher
group_replication_recovery_ssl_crl
group_replication_recovery_ssl_crlpath
group_replication_recovery_ssl_key
group_replication_recovery_ssl_verify_server_cert OFF
group_replication_recovery_use_ssl OFF
group_replication_single_primary_mode OFF
group_replication_ssl_mode DISABLED
group_replication_start_on_boot OFF
group_replication_transaction_size_limit 0
group_replication_unreachable_majority_timeout 0
gtid_executed
gtid_executed_compression_period 1000
gtid_mode OFF
gtid_owned
gtid_purged
have_dynamic_loading YES
have_openssl YES
have_profiling NO
have_query_cache NO
have_ssl YES
have_symlink YES
hostname
ignore_builtin_innodb NO
information_schema_stats_expiry 86400
init_connect
innodb_adaptive_flushing ON
innodb_adaptive_flushing_lwm 10
innodb_adaptive_hash_index ON
innodb_adaptive_hash_index_parts 8
innodb_adaptive_max_sleep_delay 150000
innodb_api_bk_commit_interval 5
innodb_api_disable_rowlock OFF
innodb_api_trx_level 0
innodb_autoextend_increment 64
innodb_autoinc_lock_mode 1
innodb_background_drop_list_empty OFF
innodb_buffer_pool_chunk_size 134217728
innodb_buffer_pool_dump_at_shutdown ON
innodb_buffer_pool_dump_now OFF
innodb_buffer_pool_dump_pct 25
innodb_buffer_pool_filename ib_buffer_pool
innodb_buffer_pool_instances 8
innodb_buffer_pool_load_abort OFF
innodb_buffer_pool_load_at_startup ON
innodb_buffer_pool_load_now OFF
innodb_buffer_pool_size 134217728
innodb_change_buffering all
innodb_change_buffering_debug 0
innodb_change_buffer_max_size 25
innodb_checksums ON
innodb_checksum_algorithm crc32
innodb_cmp_per_index_enabled OFF
innodb_commit_concurrency 0
innodb_compression_failure_threshold_pct 5
innodb_compression_level 6
innodb_compression_pad_pct_max 50
innodb_compress_debug NONE
innodb_concurrency_tickets 5000
innodb_data_file_path ibdata1:12M:autoextend
innodb_data_home_dir
innodb_deadlock_detect 1
innodb_default_row_format DYNAMIC
innodb_disable_resize_buffer_pool_debug ON
innodb_disable_sort_file_cache OFF
innodb_doublewrite ON
innodb_file_format Barracuda
innodb_file_format_check ON
innodb_file_format_max Barracuda
innodb_file_per_table ON
innodb_fill_factor 100
innodb_fil_make_page_dirty_debug 0
innodb_flushing_avg_loops 30
innodb_flush_log_at_timeout 1
innodb_flush_log_at_trx_commit 1
innodb_flush_method null
innodb_flush_neighbors 1
innodb_flush_sync ON
innodb_force_load_corrupted OFF
innodb_force_recovery 0
innodb_ft_cache_size 8000000
innodb_ft_enable_diag_print OFF
innodb_ft_num_word_optimize 2000
innodb_ft_result_cache_limit 2000000000
innodb_ft_server_stopword_table
innodb_ft_sort_pll_degree 2
innodb_ft_total_cache_size 640000000
innodb_large_prefix ON
innodb_limit_optimistic_insert_debug 0
innodb_lock_wait_timeout 50
innodb_log_checkpoint_now OFF
innodb_log_checksums 1
innodb_log_compressed_pages 1
innodb_log_write_ahead_size 8192
innodb_lru_scan_depth 1024
innodb_max_dirty_pages_pct 75
innodb_max_dirty_pages_pct_lwm 0
innodb_max_purge_lag 0
innodb_max_purge_lag_delay 0
innodb_max_undo_log_size 1073741824
innodb_merge_threshold_set_all_debug 50
innodb_online_alter_log_max_size 134217728
innodb_optimize_fulltext_only OFF
innodb_page_size 16384
innodb_print_all_deadlocks 0
innodb_read_only OFF
innodb_replication_delay 0
innodb_rollback_on_timeout OFF
innodb_saved_page_number_debug 0
innodb_sort_buffer_size 1048576
innodb_stats_auto_recalc ON
innodb_stats_include_delete_marked OFF
innodb_stats_method nulls_equal
innodb_stats_on_metadata OFF
innodb_stats_persistent ON
innodb_stats_persistent_sample_pages 20
innodb_stats_sample_pages 8
innodb_stats_transient_sample_pages 8
innodb_strict_mode ON
innodb_support_xa ON
innodb_sync_debug OFF
innodb_table_locks 1
innodb_temp_data_file_path ibtmp1:12M:autoextend
innodb_tmpdir
innodb_trx_purge_view_update_only_debug OFF
innodb_trx_rseg_n_slots_debug 0
innodb_undo_logs 128
innodb_undo_log_truncate 0
innodb_version 5.7.38
interactive_timeout 28800
join_buffer_size 262144
keyring_aws_cmk_id
keyring_aws_conf_file
keyring_aws_data_file
keyring_aws_region us-east-1
keyring_encrypted_file_data
keyring_encrypted_file_password
keyring_file_data
keyring_okv_conf_dir
keyring_operations ON
key_buffer_size 8388608
key_cache_age_threshold 300
key_cache_block_size 1024
key_cache_division_limit 100
language
lc_messages en_US
lc_messages_dir
lc_time_names en_US
license
local_infile ON
lock_wait_timeout 31536000
log_bin ON
log_bin_trust_function_creators 0
log_bin_use_v1_row_events 0
log_builtin_as_identified_by_password 0
log_row_value_options
long_query_time 10
lower_case_file_system OFF
lower_case_table_names 2
low_priority_updates OFF
master_info_repository FILE
master_verify_checksum OFF
max_allowed_packet 16777216
max_binlog_cache_size 18446744073709500416
max_binlog_size 1073741824
max_binlog_stmt_cache_size 18446744073709500416
max_connections 2147483647
max_connect_errors 100
max_digest_length 1024
max_error_count 64
max_execution_time 0
max_insert_delayed_threads 0
max_join_size 18446744073709547520
max_length_for_sort_data 1024
max_prepared_stmt_count 16382
max_relay_log_size 0
max_seeks_for_key 18446744073709551615
max_sort_length 1024
max_sp_recursion_depth 0
max_tmp_tables 32
max_user_connections 0
max_write_lock_count 18446744073709500416
mecab_rc_file
metadata_locks_cache_size 1024
metadata_locks_hash_instances 8
min_examined_row_limit 0
multi_range_count 256
myisam_mmap_size 18446744073709551615
mysqlx_connect_timeout 30
mysqlx_idle_worker_thread_timeout 60
mysqlx_max_allowed_packet 67108864
mysqlx_max_connections 100
mysqlx_min_worker_threads 2
mysql_firewall_mode OFF
mysql_firewall_trace OFF
mysql_native_password_proxy_users OFF
ndbinfo_database ndbinfo
ndbinfo_table_prefix ndb$
ndbinfo_version
ndb_batch_size 32768
ndb_cluster_connection_pool 1
ndb_cluster_connection_pool_nodeids
ndb_log_apply_status OFF
ndb_log_bin ON
ndb_log_fail_terminate OFF
ndb_log_orig OFF
ndb_log_transaction_id OFF
ndb_optimized_node_selection 3
Ndb_system_name
ndb_use_copying_alter_table OFF
ndb_version
ndb_version_string
ndb_wait_connected 30
ndb_wait_setup 30
net_buffer_length 16384
net_read_timeout 30
net_retry_count 10
net_write_timeout 60
new OFF
ob_bnl_join_cache_size 10485760
ob_check_sys_variable ON
ob_compatibility_control MYSQL5.7
ob_compatibility_mode MYSQL
ob_compatibility_version 4.3.5.0
ob_default_lob_inrow_threshold 8192
ob_early_lock_release OFF
ob_enable_aggregation_pushdown ON
ob_enable_index_direct_select OFF
ob_enable_jit OFF
ob_enable_parameter_anonymous_block ON
ob_enable_plan_cache ON
ob_enable_pl_cache ON
ob_enable_rich_error_msg OFF
ob_enable_sql_audit ON
ob_enable_transformation ON
ob_enable_transmission_checksum ON
ob_enable_truncate_flashback OFF
ob_interm_result_mem_limit 2147483648
ob_kv_mode ALL
ob_log_level disabled
ob_max_read_stale_time -1
ob_plan_cache_evict_high_percentage 90
ob_plan_cache_evict_low_percentage 50
ob_plan_cache_percentage 5
ob_pl_block_timeout 3216672000000000
ob_query_timeout 10000000
ob_read_consistency STRONG
ob_reserved_meta_memory_percentage 10
ob_route_policy READONLY_ZONE_FIRST
ob_security_version 4.3.5.0
ob_sql_audit_percentage 3
ob_sql_work_area_percentage 5
ob_table_access_policy AUTO
ob_tcp_invited_nodes %
ob_temp_tablespace_size_percentage 0
ob_trx_idle_timeout 86400000000
ob_trx_lock_timeout -1
ob_trx_timeout 86400000000
old_alter_table OFF
old_passwords 0
optimizer_capture_sql_plan_baselines OFF
optimizer_dynamic_sampling 1
optimizer_features_enable 4.3.5.0
optimizer_prune_level 1
optimizer_search_depth 62
optimizer_switch
optimizer_trace
optimizer_trace_features
optimizer_trace_limit 1
optimizer_trace_max_mem_size 16384
optimizer_trace_offset -1
optimizer_use_sql_plan_baselines OFF
parallel_degree_limit 64
parallel_degree_policy AUTO
parallel_min_scan_time_threshold 100
parallel_servers_target 30
parser_max_mem_size 18446744073709551615
partition_index_dive_limit 10
performance_schema OFF
performance_schema_show_processlist OFF
plsql_optimize_level 2
plugin_dir ./plugin_dir/
privilege_features_enable 4.3.5.0
profiling OFF
profiling_history_size 15
protocol_version 10
query_alloc_block_size 8192
query_cache_limit 0
query_cache_min_res_unit 0
query_cache_size 0
query_cache_type OFF
query_cache_wlock_invalidate OFF
query_prealloc_size 8192
query_rewrite_enabled FALSE
query_rewrite_integrity ENFORCED
range_alloc_block_size 4096
range_index_dive_limit 10
range_optimizer_max_mem_size 8388608
read_only OFF
recyclebin OFF
regexp_stack_limit 8000000
regexp_time_limit 32
relay_log_info_repository FILE
relay_log_purge 1
replication_optimize_for_static_plugin_config OFF
replication_sender_observe_commit_only OFF
resource_manager_plan
rewriter_enabled ON
rewriter_verbose 0
rpl_semi_sync_master_enabled OFF
rpl_semi_sync_master_timeout 10000
rpl_semi_sync_master_trace_level 32
rpl_semi_sync_master_wait_for_slave_count 1
rpl_semi_sync_master_wait_no_slave OFF
rpl_semi_sync_master_wait_point AFTER_SYNC
rpl_semi_sync_slave_enabled OFF
rpl_semi_sync_slave_trace_level 32
rpl_stop_slave_timeout 31536000
runtime_bloom_filter_max_size 2147483648
runtime_filter_max_in_num 1024
runtime_filter_type BLOOM_FILTER,RANGE,IN
runtime_filter_wait_time_ms 10
secure_auth ON
secure_file_priv
server_id 1
server_uuid d3755134-726f-11f0-af6f-080027f62b5b
session_track_gtids OFF
session_track_schema ON
session_track_state_change OFF
session_track_system_variables time_zone, autocommit, character_set_client, character_set_results, character_set_connection
session_track_transaction_info OFF
sha256_password_auto_generate_rsa_keys ON
sha256_password_private_key_path private_key.pem
sha256_password_proxy_users OFF
sha256_password_public_key_path public_key.pem
show_compatibility_56 OFF
show_create_table_verbosity OFF
show_old_temporals OFF
skip_external_locking ON
skip_show_database 0
skip_slave_start OFF
slave_allow_batching OFF
slave_checkpoint_group 512
slave_checkpoint_period 300
slave_compressed_protocol OFF
slave_exec_mode STRICT
slave_load_tmpdir
slave_max_allowed_packet 1073741824
slave_net_timeout 60
slave_parallel_type DATABASE
slave_parallel_workers 0
slave_pending_jobs_size_max 16777216
slave_preserve_commit_order OFF
slave_rows_search_algorithms TABLE_SCAN,INDEX_SCAN
slave_skip_errors OFF
slave_sql_verify_checksum OFF
slave_transaction_retries 10
slave_type_conversions ALL_LOSSY
slow_query_log 0
slow_query_log_file /usr/local/mysql/data/obrd-slow.log
sort_buffer_size 262144
sql_auto_is_null OFF
sql_big_selects ON
sql_buffer_result 0
sql_mode STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER
sql_notes OFF
sql_quote_show_create ON
sql_safe_updates OFF
sql_select_limit 9223372036854775807
sql_slave_skip_counter 0
sql_throttle_cpu -1
sql_throttle_current_priority 100
sql_throttle_io -1
sql_throttle_logical_reads -1
sql_throttle_network -1
sql_throttle_priority -1
sql_throttle_rt -1
sql_warnings OFF
ssl_ca
ssl_capath
ssl_cert
ssl_cipher
ssl_crl
ssl_crlpath
ssl_key
stored_program_cache 256
super_read_only OFF
sync_binlog 1
sync_relay_log 10000
sync_relay_log_info 10000
system_time_zone +08:00
table_definition_cache -1
table_open_cache_instances 16
time_format %H:%i:%s
time_zone +08:00
tls_version
tmpdir
tmp_table_size 16777216
transaction_alloc_block_size 8192
transaction_isolation READ-COMMITTED
transaction_prealloc_size 4096
transaction_read_only OFF
transaction_write_set_extraction OFF
tx_isolation READ-COMMITTED
tx_read_only OFF
unique_checks ON
updatable_views_with_limit ON
validate_password_check_user_name on
validate_password_dictionary_file
validate_password_length 0
validate_password_mixed_case_count 0
validate_password_number_count 0
validate_password_policy low
validate_password_special_char_count 0
version 5.7.25-OceanBase_CE-v4.3.5.0
version_comment OceanBase_CE 4.3.5.0 (r100000202024123117-5d6cb5cbc3f7c1ab6eb22e40abec8e160a8764d5) (Built Dec 31 2024 17:35:01)
version_compile_machine
version_compile_os
version_tokens_session
wait_timeout 28800
_aggregation_optimization_settings 0
_enable_mysql_pl_priv_check ON
_enable_storage_cardinality_estimation ON
_optimizer_cost_based_transformation 1
_optimizer_gather_stats_on_load ON
_optimizer_null_aware_antijoin ON
_priv_control
_windowfunc_optimization_settings 0

点赞

SELECT c.TENANT_ID, e.TENANT_NAME, f.SVR_IP,concat(c.NAME, ': ', d.NAME)`pool:conf`,concat(c.UNIT_COUNT, ' unit: ', d.min_cpu, 'C/', ROUND(d.MEMORY_SIZE/1024/1024/1024,0), "G") unit_info FROM DBA_OB_RESOURCE_POOLS c, DBA_OB_UNIT_CONFIGS d, DBA_OB_TENANTS e ,DBA_OB_UNITS f WHERE c.UNIT_CONFIG_ID=d.UNIT_CONFIG_ID AND c.TENANT_ID=e.TENANT_ID AND e.TENANT_ID=f.TENANT_ID AND c.RESOURCE_POOL_ID=f.RESOURCE_POOL_ID ORDER BY c.TENANT_ID;

select * from dba_ob_units;

这两个查下看下

租户ID变成了1006 又重新做了恢复吗?

select * from __all_virtual_replay_stat where tenant_id = 1006;