达梦8物理冷备与恢复
作者:互联网
1.达梦冷备需要关闭数据库服务
./DmServicedmdb stop
2.开启归档
无论冷备份还是热备份,DmAPService服务是必须开启的(数据库辅助插件服务)
ps -ef | grep DmAPServic
alter database mount;
alter database add archivelog ‘dest=/dmdata/arch,TYPE=local,FILE_SIZE=256,SPACE_LIMIT=1024’;
alter database archivelog;
alter database open;
3.用dmrman进行备份
cd /home/dmdba/dmdbms/bin
./dmrman
backup database ‘/dmdata/dmdb/dm.ini’ backupset ‘/dmdata/dmback/dmdb_full_01’;
4.模拟删除数据库文件,演练数据库故障
rm -rf /dmdata/dmdb/*.DBF
5. 冷备恢复:
./dmrman
restore database ‘/dmdata/dmdb/dm.ini’ from backupset ‘/dmdata/dmback/dmdb_full_01’
recover database ‘/dmdata/dmdb/dm.ini’ from backupset ‘/dmdata/dmback/dmdb_full_01’
recover database ‘/dmdata/dmdb/dm.ini’ update db_magic
exit;
6.重新启动数据库
./DmServicedmdb start
7.检查数据
disql sysdba/dameng123
select name,status$ from v$database;
标签:冷备,dm,database,dmdb,ini,物理,alter,达梦,dmdata 来源: https://blog.csdn.net/qq_42079557/article/details/121333151