Call the Linux date function to achieve an Oracle backup every day

xiaoxiao2021-03-06  44

-bash-2.05b $ more /opt/oracle/product/movedata/movedata1.sh

Oracle_Home = / OPT / Oracle / Product / 9.0.2

Export Oracle_home

. /opt/oracle/product/.bash_profile

Export Date = $ (DATE % Y% M% D) # calls the Linux date function, realize the file, named the daily backup /opt/oracle/product/9.0.2/bin/exp

Goldring / 123456 @ szdb file = / data / oracledb_backup / goldring.dmp log = / data / oracledb_back

Up / loggoldring.dmp consistent = yes

/opt/oracle/product/9.0.2/bin/exp

JLTGAME / 123456 @ szdb file = / data / oracledb_backup /

JLTGame $ DATE.DMP log = / data / oracledb_ba

CKUP / logjltgame.dmp consistent = yes

/opt/racle/product/9.0.2/bin/exp userid = Oraclebackup / "Abcd456" ("@ szdb @ @ szdb @ = moonprincess file = / data / oracledb_backup / moon

Princess.dmp log = / data / oracledb_backup / logmoonprindes.dmp consistent = yes

#ftp -n 10.0.0.3

Put the above script in crontab

Note: Oracle Automatic Backup Key is to join Oracle environment variables in the backup script and add $ DATE variables in the backup file name.

转载请注明原文地址:https://www.9cbs.com/read-61307.html

New Post(0)