备份正常恢复的时候命令没有报错,但是日志里面错误很多,数据表数据也都没同步过来

【 使用版本 】4.2.1
【问题描述】备份正常恢复的时候命令没有报错,但是日志里面错误很多,数据表数据也都没同步过来
【错误信息】以下是部分错误日志
[2024-08-16 11:32:00.072150] WDIAG [SQL.RESV] resolve_table_relation_recursively (ob_dml_resolver.cpp:7546) [2175][TsMgr][T1079][YB427F000001-00061FC47BC6DB7C-0-0] [lt=13][errcode=-5019] synonym not exist(tenant_id=1079, database_id=201001, table_name=__all_ls_status, ret=-5019)
[2024-08-16 11:32:00.072157] WDIAG [SQL.RESV] resolve_table_relation_factor_normal (ob_dml_resolver.cpp:7376) [2175][TsMgr][T1079][YB427F000001-00061FC47BC6DB7C-0-0] [lt=6][errcode=-5019] fail to resolve table relation recursively(tenant_id=1079, ret=-5019, database_id=201001, database_id=201001, table_name=__all_ls_status, db_name=oceanbase)
[2024-08-16 11:32:00.072164] WDIAG [SQL.RESV] resolve_table_relation_factor (ob_dml_resolver.cpp:7219) [2175][TsMgr][T1079][YB427F000001-00061FC47BC6DB7C-0-0] [lt=6][errcode=-5019] resolve table relation factor failed(ret=-5019, table_name=__all_ls_status)
[2024-08-16 11:32:00.072171] WDIAG [SQL.RESV] inner_resolve_sys_view (ob_dml_resolver.cpp:2165) [2175][TsMgr][T1079][YB427F000001-00061FC47BC6DB7C-0-0] [lt=5][errcode=-5019] fail to resolve table(ret=-5019)
[2024-08-16 11:32:00.072176] WDIAG [SQL.RESV] resolve_table_relation_factor_wrapper (ob_dml_resolver.cpp:2220) [2175][TsMgr][T1079][YB427F000001-00061FC47BC6DB7C-0-0] [lt=5][errcode=-5019] fail to resolve sys view(ret=-5019)
[2024-08-16 11:32:00.072184] WDIAG resolve_basic_table_without_cte (ob_dml_resolver.cpp:2316) [2175][TsMgr][T1079][YB427F000001-00061FC47BC6DB7C-0-0] [lt=5][errcode=-5019] Table ‘oceanbase.__all_ls_status’ doesn’t exist
[2024-08-16 11:31:59.968674] WDIAG [SERVER] query (ob_inner_sql_connection.cpp:927) [2120][EvtHisUpdTask][T1][YB427F000001-00061FC47746DB8B-0-0] [lt=4][errcode=-5167] failed to close result(close_ret=-5167, ret=-5167)
[2024-08-16 11:31:59.968684] WDIAG [SERVER] query (ob_inner_sql_connection.cpp:957) [2120][EvtHisUpdTask][T1][YB427F000001-00061FC47746DB8B-0-0] [lt=4][errcode=-5167] failed to process record(executor={ObIExecutor:, sql:“INSERT INTO __all_rootservice_event_history (gmt_create, module, event, name1, value1, name2, value2, name3, value3, name4, value4, name5, value5, name6, value6, extra_info, rs_svr_ip, rs_svr_port) VALUES (usec_to_time(1723779119967412), ‘LS’, ‘update_ls_init_member_list’, ‘tenant_id’, 1079, ‘ls_id’, ‘{id:1}’, ‘ret’, 0, ‘sql’, X’555044415445205F5F616C6C5F6C735F7374617475732073657420696E69745F6D656D6265725F6C697374203D2027317B7365727665723A223132372E302E302E313A32383832222C2074696D657374616D703A312C20666C61673A307D272C20625F696E69745F6D656D6265725F6C697374203D20273031433838313830383030303031303139333830383038303030303138423830383038303030303438313830383046383037303030303030433231363031303030313937383038303830303030313836383038303830303030343030303030303030303046464646464646464646464646464646464630313030303139373830383038303030303138363830383038303030303430303030303030303030464646464646464646464646464646464646303130303031393738303830383030303031383638303830383030303034303030303030303030304646464646464646464646464646464646463031303030313937383038303830303030313836383038303830303030343030303030303030303046464646464646464646464646464646464630313030303139373830383038303030303138363830383038303030303430303030303030303030464646464646464646464646464646464646303130303031393738303830383030303031383638303830383030303034303030303030303030304646464646464646464646464646464646463031303027207768657265206C735F6964203D203120616E642074656E616E745F6964203D203130373920616E6420625F696E69745F6D656D6265725F6C697374206973206E756C6C’, ‘’, 0, ‘’, 0, X’74726163655F69643A5942343237463030303030312D303030363146433437373636444239442D302D30’, ‘127.0.0.1’, 2882)”}, record_ret=-5167, ret=-5167)
[2024-08-16 11:31:59.968694] WDIAG [SERVER] query (ob_inner_sql_connection.cpp:993) [2120][EvtHisUpdTask][T0][YB427F000001-00061FC47746DB8B-0-0] [lt=6][errcode=-5167] failed to process final(executor={ObIExecutor:, sql:"INSERT INTO all_rootservice_event_history (gmt_create, module, event, name1, value1, name2, value2, name3, value3, name4, value4, name5, value5, name6, value6, extra_info, rs_svr_ip, rs_svr_port) VALUES (usec_to_time(1723779119967412), ‘LS’, ‘update_ls_init_member_list’, ‘tenant_id’, 1079, ‘ls_id’, ‘{id:1}’, ‘ret’, 0, ‘sql’, X’555044415445205F5F616C6C5F6C735F7374617475732073657420696E69745F6D656D6265725F6C697374203D2027317B7365727665723A223132372E302E302E313A32383832222C2074696D657374616D703A312C20666C61673A307D272C20625F696E69745F6D656D6265725F6C697374203D20273031433838313830383030303031303139333830383038303030303138423830383038303030303438313830383046383037303030303030433231363031303030313937383038303830303030313836383038303830303030343030303030303030303046464646464646464646464646464646464630313030303139373830383038303030303138363830383038303030303430303030303030303030464646464646464646464646464646464646303130303031393738303830383030303031383638303830383030303034303030303030303030304646464646464646464646464646464646463031303030313937383038303830303030313836383038303830303030343030303030303030303046464646464646464646464646464646464630313030303139373830383038303030303138363830383038303030303430303030303030303030464646464646464646464646464646464646303130303031393738303830383030303031383638303830383030303034303030303030303030304646464646464646464646464646464646463031303027207768657265206C735F6964203D203120616E642074656E616E745F6964203D203130373920616E6420625F696E69745F6D656D6265725F6C697374206973206E756C6C’, ‘’, 0, ‘’, 0, X’74726163655F69643A5942343237463030303030312D303030363146433437373636444239442D302D30’, ‘127.0.0.1’, 2882)"}, aret=-5167, ret=-5167)
[2024-08-15 10:36:04.823805] WDIAG [ARCHIVE] do_thread_task
(ob_archive_sender.cpp:256) [2415][T1_ArcSender][T1][YB427F000001-00061F9EF24A2C16-0-0] [lt=24][errcode=-4018] try free send task failed(ret=-4018)
[2024-08-15 10:36:05.147226] WDIAG [SERVER] inner_get_next_row (ob_all_virtual_ls_info.cpp:54) [2854][BlackListServic][T1][YB427F000001-00061F9EF4BA979E-0-0] [lt=23][errcode=-4008] execute fail(ret=-4008)
[2024-08-15 10:36:05.678923] WDIAG [SERVER.OMT] got_versions (ob_tenant_config_mgr.cpp:565) [2856][LeaseHB][T0][Y0-0000000000000000-0-0] [lt=4][errcode=-4201] fail got version(tenant_id=1068, version=1723620307135340, ret=-4201)
[2024-08-15 10:36:06.447417] WDIAG [SHARE] inner_get_ls_status
(ob_ls_status_operator.cpp:959) [2355][T1_DupTbLease][T1][Y0-0000000000000000-0-0] [lt=13][errcode=-4018] ls not exist in __all_ls_status table(ret=-4018, ret=“OB_ENTRY_NOT_EXIST”)
[2024-08-15 10:36:06.811094] WDIAG [PALF] set_base_lsn (palf_handle_impl.cpp:1595) [2407][T1_TxCkpt][T1][Y0-0000000000000000-0-0] [lt=9][errcode=0] no need to set new base lsn, curr base lsn is greater than or equal to new base lsn(this={palf_id:1,
[2024-08-15 10:36:07.679438] WDIAG [SERVER] do_heartbeat_event (ob_heartbeat.cpp:288) [2856][LeaseHB][T0][Y0-0000000000000000-0-0] [lt=4][errcode=0] tenant got versions failed(tmp_ret=-4201)
[2024-08-15 10:36:07.957744] WDIAG load_file_to_string (utility.h:662) [2027][ServerGTimer][T0][Y0-0000000000000000-0-0] [lt=9][errcode=0] read /sys/class/net/lo/speed failed, errno 22
[2024-08-15 10:36:07.957769] WDIAG get_ethernet_speed (utility.cpp:580) [2027][ServerGTimer][T0][Y0-0000000000000000-0-0] [lt=21][errcode=-4000] load file /sys/class/net/lo/speed failed, ret -4000
[2024-08-15 10:36:07.957778] WDIAG [SERVER] get_network_speed_from_sysfs (ob_server.cpp:2807) [2027][ServerGTimer][T0][Y0-0000000000000000-0-0] [lt=7][errcode=-4000] cannot get Ethernet speed, use default(tmp_ret=0, devname=“lo”)
[2024-08-15 10:36:07.957787] WDIAG [SERVER] runTimerTask (ob_server.cpp:3341) [2027][ServerGTimer][T0][Y0-0000000000000000-0-0] [lt=8][errcode=-4000] ObRefreshNetworkSpeedTask reload bandwidth throttle limit failed(ret=-4000, ret=“OB_ERROR”)

2 个赞

在黑屏做的恢复吗?请描述一下你的操作步骤

2 个赞

我两台机器,一台做备份,备份后把生成的文件放到第二台机器上执行恢复命令没有报错,但发现创建的表数据都没有同步,然后查看了日志就出现下面这些,这只是部分

2 个赞

黑屏操作

2 个赞

租户级恢复还是集群级恢复?麻烦发下observer.log 以及每个步骤的操作命令

操作步骤
oceanbase步骤.txt (2.4 KB)
操作之后两边的表不一致,效果图
1724051210239

select * from DBA_OB_RESTORE_HISTORY;
select * from DBA_OB_RESTORE_PROGRESS\G

这几个表 你查看过没 ?

你看一下

image

从这个来看 您今天 应该恢复成功了 。 现在还查询不到数据吗 ?

通过查询命令恢复是成功了,但是数据库没有成功,我上面有上传过效果图片

您看方便留个联系方式,帮忙查看解决一下吗

操作步骤:

第一台机器备份操作
1.sudo yum install nfs-utils
2.sudo vi /etc/exports
3.sudo chown nobody:nobody -R /data/nfs_server
4.sudo systemctl restart nfs-server
5.sudo vi /etc/sysconfig/nfs 输入内容
RPCNFSDCOUNT=8
RPCNFSDARGS="-N 2 -N 3 -U"
NFSD_V4_GRACE=90
NFSD_V4_LEASE=90
6.sudo systemctl restart nfs-server
sudo vi /etc/sysctl.conf
sudo sysctl -w sunrpc.tcp_max_slot_table_entries=128
cat /proc/sys/sunrpc/tcp_max_slot_table_entries
7.obclient -h127.0.0.1 -P2881 -uroot -p’Passw’

obclient [(none)]> CREATE RESOURCE POOL dscom_resource_pool1
→ UNIT = ‘dscom_unit_config1’,
→ UNIT_NUM = 1,
→ zone_list = (‘zone1’);
Query OK, 0 rows affected (0.022 sec)

obclient [(none)]> CREATE TENANT IF NOT EXISTS test_tenant
→ PRIMARY_ZONE=‘zone1’,
→ RESOURCE_POOL_LIST=(‘dscom_resource_pool1’)
→ set OB_TCP_INVITED_NODES=’%’;
Query OK, 0 rows affected (36.809 sec)

obclient [(none)]> ALTER SYSTEM SET LOG_ARCHIVE_DEST=‘LOCATION=file:///data/nfs/backup/archive’ TENANT = test_tenant;
Query OK, 0 rows affected (0.107 sec)

obclient [(none)]> ALTER SYSTEM ARCHIVELOG TENANT = test_tenant;
Query OK, 0 rows affected (0.016 sec)

obclient [(none)]> SELECT TENANT_NAME, LOG_MODE FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_TYPE = ‘USER’\G
*************************** 1. row ***************************
TENANT_NAME: test_tenant
LOG_MODE: ARCHIVELOG
1 row in set (0.038 sec)

obclient [(none)]> ALTER SYSTEM SET DATA_BACKUP_DEST= ‘file:///data/nfs/backup/data’ TENANT = test_tenant;
Query OK, 0 rows affected (0.052 sec)

obclient [(none)]> ALTER SYSTEM BACKUP DATABASE;
Query OK, 0 rows affected (0.038 sec)

第二台机器恢复操作
1.obclient -h127.0.0.1 -P2881 -uroot -p’Passw’

obclient [oceanbase]> CREATE RESOURCE UNIT dscom_unit_config1
→ max_cpu = 1,
→ min_cpu = 1,
→ memory_size = ‘3G’,
→ log_disk_size = ‘3G’;
Query OK, 0 rows affected (0.037 sec)

obclient [oceanbase]> CREATE RESOURCE POOL dscom_resource_pool1
→ UNIT = ‘dscom_unit_config1’,
→ UNIT_NUM = 1,
→ zone_list = (‘zone1’);
Query OK, 0 rows affected (0.041 sec)

obclient [oceanbase]> ALTER SYSTEM RESTORE mysql FROM ‘file:///data/nfs/backup/data,file:///data/nfs/backup/archive’ WITH ‘pool_list=dscom_resource_pool1’;
Query OK, 0 rows affected (1 min 1.313 sec)

看你的操作步骤,你是想备份test_tenant租户,然后恢复为“mysql”租户,

然后是想对比恢复出来的database是否一致,

但是你两张截图都是sys租户的查询结果,你分别登录test_tenant和“mysql”租户查询下

另外如果使用sys租户操作备份用户租户,使用如下命令:
ALTER SYSTEM BACKUP TENANT = mysql_tenant [PLUS ARCHIVELOG];
或者
ALTER SYSTEM BACKUP TENANT = mysql_tenant;

您把您的操作做个记录流程吧,发出来看看到底哪里出现问题了 , 和上面的对照下

这个问题有进展吗

看表象解决了,日志错误还是很多

可以了,我自己的问题

可以指定租户test_tenant备份再恢复试下,你之前操作是备份的集群,然后做的恢复,sys是不支持恢复的,并且其它租户的资源池应该也没有创建 这两种情况日志都会报错,如果还有问题欢迎继续提问。