达梦DM8自带备份工具console备份失败的问题处理

达梦DM8自带备份工具console备份失败的问题

最近学习达梦DM8数据库使用,其提供了一个图形界面的备份工具,位于tool目录下,名称叫console,使用中发现总是备份失败,通过命令行备份工具dmrman备份后,用该工具尝试恢复也报错,检查目录发现备份数据是恢复到了data目录,但数据文件拥有者变成root用户了,不是数据库安装用户dmdba,怀疑是由于console使用root用户启动的问题
尝试用dmdba用户启动console工具,报错如下

[dmdba@localhost tool]$ ./console
<title>Invalid Configuration Location</title>Locking is not possible in the 
directory "/dm8/tool/configuration/org.eclipse.osgi". A common reason is 
that the file system or Runtime Environment does not support file locking 
for that location. Please choose a different location, or disable file 
locking passing "-Dosgi.locking=none" as a VM argument. 
/dm8/tool/configuration/org.eclipse.osgi/.manager/.fileTableLock (权限不够)

检查/tool/configuration/目录,发现org.eclipse.osgi目录用户是root。

-rw-r--r-- 1 dmdba dinstall 4114 1\u6708  27 16:48 1611737311297.log
-rwxr-xr-x 1 dmdba dinstall  623 1\u6708  26 08:07 config.ini
drwxr-xr-x 3 root  root      163 1\u6708  26 08:15 org.eclipse.core.runtime
drwxr-xr-x 3 root  root       22 1\u6708  26 08:11 org.eclipse.equinox.app
drwxr-xr-x 2 dmdba dinstall   26 1\u6708  26 08:07 org.eclipse.equinox.simpleconfigurator
drwxr-xr-x 4 root  root       89 1\u6708  26 08:15 org.eclipse.osgi

在root用户下修改目录拥有者为dmdba

[root@localhost configuration]# chown dmdba:dinstall -R org.eclipse.osgi/
[root@localhost configuration]# ls -al
\u603b\u7528\u91cf 20
drwxr-xr-x 6 dmdba dinstall  207 1\u6708  27 17:11 .
drwxr-xr-x 9 dmdba dinstall 4096 1\u6708  27 17:11 ..
-rw-r--r-- 1 dmdba dinstall 4114 1\u6708  27 16:48 1611737311297.log
-rw-r--r-- 1 dmdba dinstall 3682 1\u6708  27 17:11 1611738679719.log
-rwxr-xr-x 1 dmdba dinstall  623 1\u6708  26 08:07 config.ini
drwxr-xr-x 3 root  root      163 1\u6708  26 08:15 org.eclipse.core.runtime
drwxr-xr-x 3 root  root       22 1\u6708  26 08:11 org.eclipse.equinox.app
drwxr-xr-x 2 dmdba dinstall   26 1\u6708  26 08:07 org.eclipse.equinox.simpleconfigurator
drwxr-xr-x 4 dmdba dinstall   89 1\u6708  26 08:15 org.eclipse.osgi

再次尝试用dmdba用户启动console,这次报错是

[dmdba@localhost tool]$ ./console
An error has occurred. See the log file
/dm8/tool/configuration/1611738779714.log.

查看/dm8/tool/configuration/1611738779714.log日志文件,可以看到报错

java.lang.IllegalStateException: The platform metadata area could not be
written: /dm8/tool/workspace/console/.metadata.  By default the platform
writes its content

检查/dm8/tool/workspace/console/目录,发现拥有者也是root,修改目录拥有者

[root@localhost workspace]# ls -al
\u603b\u7528\u91cf 4
drwxr-xr-x 6 dmdba dinstall   61 1\u6708  26 08:15 .
drwxr-xr-x 9 dmdba dinstall 4096 1\u6708  27 17:12 ..
drwxr-xr-x 3 root  root       23 1\u6708  26 08:15 console
drwxr-xr-x 3 dmdba dinstall   23 1\u6708  26 08:11 help
drwxr-xr-x 4 dmdba dinstall   29 1\u6708  26 08:07 local
drwxr-xr-x 3 root  root       55 1\u6708  26 08:11 manager
[root@localhost workspace]# chown dmdba:dinstall -R console/
[root@localhost workspace]# ls -al
\u603b\u7528\u91cf 4
drwxr-xr-x 6 dmdba dinstall   61 1\u6708  26 08:15 .
drwxr-xr-x 9 dmdba dinstall 4096 1\u6708  27 17:18 ..
drwxr-xr-x 3 dmdba dinstall   23 1\u6708  26 08:15 console
drwxr-xr-x 3 dmdba dinstall   23 1\u6708  26 08:11 help
drwxr-xr-x 4 dmdba dinstall   29 1\u6708  26 08:07 local
drwxr-xr-x 3 root  root       55 1\u6708  26 08:11 manager

再次尝试用dmdba用户启动console,这次可以正常启动了,测试备份及恢复成功,问题解决

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

tan_hm

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值