常见备份方式
1.热备
2.rman备份
示例热备及恢复
3.查看systaux空间内容
1.热备
SQL> alter tablespace sysaux begin backup;
Tablespace altered.
[oracle@instance-ej1hspdt ~]$ cp /opt/oracle/oradata/ORCLCDB/sysaux01.dbf /backup/
SQL> alter tablespace sysaux end backup;
Tablespace altered.
---------------------------------------------------------------------------------------
恢复示例
rm /opt/oracle/oradata/ORCLCDB/sysaux01.dbf
SQL> shutdown abort;
ORACLE instance shut down.
[oracle@instance-ej1hspdt ORCLCDB]$ cp /backup/sysaux01.dbf /opt/oracle/oradata/ORCLCDB/
SQL> startup mount;
SQL> recover tablespace sysaux ;
Media recovery complete.
SQL> alter database open ;
Database altered.
2.rman 备份恢复
RMAN> backup tablespace sysaux;
Starting backup at 31-JUL-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=262 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/opt/oracle/oradata/ORCLCDB/sysaux01.dbf
output file name=/opt/oracle/fast_recovery_area/ORCLCDB/datafile/o1_mf_sysaux_gn1yx2kx_.dbf tag=TAG20190731T102330 RECID=27 STAMP=1015
064657
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:55
Finished backup at 31-JUL-19
Starting Control File and SPFILE Autobackup at 31-JUL-19
piece handle=/opt/oracle/fast_recovery_area/ORCLCDB/autobackup/2019_07_31/o1_mf_s_1015064665_gn1yyt1m_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 31-JUL-19
[oracle@instance-ej1hspdt ORCLCDB]$ rm /opt/oracle/oradata/ORCLCDB/sysaux01.dbf
RMAN> restore tablespace sysaux;
RMAN> recover tablespace sysaux;
RMAN> alter database open ;
3.查看systaux空间内容
Enterprise Manager Repository