达梦数据库脱机备份(库备份)
在root用户下关闭testdb实例服务
(注:拿testdb实例服务举例)
【[email protected] ~】#systemctl stop DmServiceTESTDB
【[email protected] ~】#systemctl status DmServiceTESTDB
在dmdba用户下执行程序./console,打开DM控制台工具
(注:dmdba用户是安装好达梦数据库的用户)
【[email protected] ~】# cd /dm8/tool
【[email protected] tool】# ll
【[email protected] tool】# ./console
在DM控制台工具里,查看备份的路径
点击备份还原,新建一个备份
使用root用户启动testdb实例
【[email protected] ~】#systemctl start DmServiceTESTDB
【[email protected] ~】#systemctl status DmServiceTESTDB
用模拟用户操作删除DMHR模式的表空间
(注:DMHR是自己创建的)
右键点击DMHR表空间选择删除
root用户关闭testdb实例
【[email protected] ~】#systemctl stop DmServiceTESTDB
【[email protected] ~】#systemctl status DmServiceTESTDB
dmdba用户执行./console命令进入控制台工具,进行脱机备份
在之前备份到的目录下,找到备份文件,先点击还原,再点击恢复,最后点击更新
使用root用户启动testdb实例
【[email protected] ~】#systemctl start DmServiceTESTDB
【[email protected] ~】#systemctl status DmServiceTESTDB