Expdp+dblink for remote backup, especially useful

Source: Internet
Author: User
Tags create directory


In many cases, the local space is not enough, but also want to backup how to do, some people say in the production system mounted a disk, in fact, can not do, Expdp+dblink help you fix!


First, the test environment description

Server-side: Oracle 11g RAC

Client: Oracle 11g Single Instance


Second, the Operation procedure

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)

)

)

2. 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 [email protected];

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 the 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: The data pump backup of Oracle database is quite good, the parameters are more, but each parameter is worth our careful testing, for database backup encryption, from a security point of view, we should do so, but in the actual environment, we really seldom use. Production environment more than 700 g data volume is still running backup script, I had to write something, not waste time is not.

This article is from the "ROIDBA" blog, make sure to keep this source http://roidba.blog.51cto.com/12318731/1952471

Expdp+dblink for remote backup, especially useful

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.