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

Automatic backup script of Oracle under Linux

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

#! / bin/bash

Export ORACLE_HOME=/usr/local/instantclient_11_2

Export PATH=$ORACLE_HOME:$PATH

Export TNS_ADMIN=$ORACLE_HOME/network/admin

Export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH

# export NLS_LANG='simplified chinese_china.ZHS16GBK'

Export NLS_LANG='simplified chinese_china.AL32UTF8'

CDir=/usr/local/instantclient_11_2 $(date-d "yesterday" + "% Y%m%d") cDir=/usr/local/instantclient_11_2

FDir=/bakup

_ user=hadoop

_ passwd=P@ssw0rdbr/ > cDir=/usr/local/instantclient_11_2

FDir=/bakup

_ user=hadoop

_ passwd=P@ssw0rd

/ bin/find $fDir/-mtime + 7-exec / bin/rm-rf {}\; > / dev/null 2 > & 1

$cDir/exp $_ user/$_passwd@$_ip/jssis file=$fDir/$d.dmp log=$fDir/$d.log owner=hadoop

Zip-m $fDir/oracle_bak$d.zip $fDir/$d.log $fDir/$d.dmp

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