Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Expdp+dblink realizes remote backup, which is especially practical.

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report