oracle 热备份
时间: 2023-11-24 13:51:33 浏览: 84
Oracle热备份脚本
以下是Oracle数据库热备份的步骤:
1.创建备份目录
```shell
mkdir -p /u01/app/oracle/hot/fulldb_20210214/archive/
```
2.设置环境变量
```shell
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
```
3.开启归档模式
```sql
SQL> alter database archivelog;
```
4.备份归档日志
```shell
SQL> host cp /u01/app/oracle/archive2/* $ORACLE_BASE/hot/fulldb_20210214/archive/
```
5.备份数据文件、控制文件
```shell
expdp system/oracle full=y directory=backup_dir dumpfile=full_backup.dmp logfile=full_backup.log
```
阅读全文