ob的数据文件和clog文件都在,怎么单独部署ob软件

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】4.2.1
【问题描述】ob的数据文件和clog这些文件都在,ob软件安装目录不在了,怎么重新部署只安装ob软件不初始化,然后起库

抱歉,目前官方没有相关方案

分布式的数据库这种基本都没办法恢复

好的,感谢

感谢,要是像Oracle,MySQL那样,只要数据文件在就能恢复就好了

  1. 环境说明(单机版)
    [admin@oceanbase redo]$ tree /redo
    /redo
    ±- clog
    ¦ ±- 10
    ¦ ±- 11
    ¦ ±- 12
    ¦ ±- 13
    ¦ ±- 4
    ¦ ±- 5
    ¦ ±- 6
    ¦ ±- 7
    ¦ ±- 8
    ¦ ±- 9
    ±- ilog
    ¦ ±- 10.154
    ¦ ±- 7
    ¦ ±- 8
    ¦ ±- 9
    ±- slog
    ±- 10

clog在/redo文件系统。

[admin@oceanbase redo]$ tree /data
/data
±- clog → /redo/clog
±- ilog → /redo/ilog
±- slog → /redo/slog
±- sstable
±- block_file

数据在/data文件系统。

2.破坏OceanBase目录
$ rm -rf oceanbase/

3.单独部署OB软件
(1).安装OceanBase数据库RPM包。

rpm -ihv …

(2).初始化OceanBase目录。
[root@xxx admin]# su - admin
$ cd /home/admin/oceanbase
$ ln -s /data store

(3).启动节点 observer 进程
cd /home/admin/oceanbase && /home/admin/oceanbase/bin/observer -i enp0s3 -P 2882 -p 2881 -z zone1 -d /data -r 192.168.56.160:2882:2881 -c 10001 -n myoceanbase -o “system_memory=3G,datafile_size=30G,memory_limit=10G”

(4).验证
[admin@oceanbase oceanbase]$ obclient -h192.168.56.160 -P2881 -uroot@sys -p’welcomeob’ -Doceanbase -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221487621
Server version: OceanBase 3.2.3.3 (r110080012024022713-3a9252da8b318ec9a499e0b294f0f933edca076c) (Built Feb 27 2024 14:08:26)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

obclient [oceanbase]> exit

OB当然也支持这种恢复。

2 个赞

不能用obd这种工具操作吧