Expdp+dblink realizes remote backup, which is especially practical.
In many cases, there is not enough local space, but also want to backup how to do, some people say that in the production system to mount a disk, in fact, it is not necessary, expdp+dblink to help you get it!
I. description of the test environment
Server side: Oracle 11g rac
Client: Oracle 11g single instance
II. Operation steps
1. Client configuration
$cd $ORACLE_HOME/network/admin
$vi tnsnames.ora
Ysdb1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.31) (PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ysdb)
)
)
two。 Client creation dblink (sys user creation)
CREATE PUBLIC DATABASE LINK "ysdb1"
CONNECT TO system
IDENTIFIED BY "oracle"
USING 'ysdb1'
3. Client authentication
SQL > select * from dual@ysdb1
D
-
X
4. Create a directory
$sudo mkdir / backup
$sudo chown-R oracle:oinstall / backup
Set lines 120
Col owner for a15
Col directory_name for a30
Col DIRECTORY_PATH for a60
Select * from dba_directories
Create directory dump_dir as'/ backup'
Grant read,write on directory dump_dir to system
5. Backup
Vi expdp.sh
Nohup expdp system/oracle directory=dump_dir dumpfile=roidba_%U.dmp logfile=roidba_expdp.log network_link='ysdb1' schemas=roidba parallel=4 cluster=n COMPRESSION=all reuse_dumpfiles=y encryption=data_only encryption_password=roidba_passwd filesize=30G &
Sh expdp.sh
Summary: Oracle database data pump backup is quite easy to use, there are many parameters, but each parameter is worth us to test carefully, for database backup encryption, from a security point of view, we should do this, but in the actual environment, we seldom use it. More than 700 gigabytes of data in the production environment is still running backup scripts, so I have to write something. I can't waste my time.