一、前言:
有的用户DBA水平不是太高,不会使用RMAN进行备份恢复,如果对现场的工程师或用户进行RMAN的培训这样将会导致额外的开销以及导致一些不必要的麻烦。如果在用户
对数据恢复要求不是特别高的情况下,或者做异机恢复的时候expdp/impdp 则是一个比较不错的选择。
如果在RAC环境下,用户需要多份备份的情况下,那么我们可以通过expdp 的多路径备份来实现在ASM上备份一份,同时在本地备份一份,或者还可以在NAS共享盘上备一份,
这样就可以完美的解决任意一台服务器或存储损坏都能实现数据恢复。
如下是我的测试过程,根据实际情况修改目录即可:
我这是测试环境,生产环境也类似,只需修改目录即可,(ASM路径写法: +DISKGROUP_NAME/DIRPATH)
二、创建相关目录并赋予权限
[[email protected] DBData]# cd / [[email protected] /]# cd DBBackup/ [[email protected] DBBackup]# ls [[email protected] DBBackup]# mkdir expdp1 [[email protected] DBBackup]# mkdir expdp2 [[email protected] DBBackup]# chown -R oracle:oinstall expdp1 [[email protected] DBBackup]# chown -R oracle:oinstall expdp2 [[email protected] DBBackup]# ll total 8 drwxr-xr-x 2 oracle oinstall 4096 Sep 5 13:33 expdp1 drwxr-xr-x 2 oracle oinstall 4096 Sep 5 13:33 expdp2
三、进入数据库做directory及赋予权限
[[email protected] DBBackup]# su - oracle [[email protected] ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 5 13:34:12 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SQL> create directory expdp1 as \
四、开始执行导出
[[email protected] expdp1]$ expdp ggs/ggs dumpfile=expdp1:ggs001.dmp,expdp2:ggs001.dmp parallel=2 Export: Release 11.2.0.4.0 - Production on Fri Sep 5 13:43:14 2014 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options FLASHBACK automatically enabled to preserve database integrity. Starting \
时间: 2024-11-06 03:26:13