I also want to share my Linux full export backup script. The script accepts the instance name as a parameter for servers that uses multiple instances.
Here's the script:
#!/bin/sh
# Set Environment Variable
. /home/oracle/.bash_profile
# Set Oracle SID
export ORACLE_SID=$1
exp full=y userid=\"/ as sysdba\" statistics=none file=/oracle/flash_recovery_area/exportArea/full_$1_$(date +\%Y-\%m-\%d).dmp log=/oracle/flash_recovery_area/exportArea/full_$1_$(date +\%Y-\%m-\%d).log
My CRONTAB entry are as follows:
SHELL=/bin/bash
### DELETE OLD DUMP FILES
0 23 * * * find /oracle/flash_recovery_area/exportArea -type f -mtime +6 -exec rm -f {} \\\;
### FULL EXPORT
0 2 * * * /oracle/flash_recovery_area/scripts/full_export.sh edctss01
No comments:
Post a Comment