Re: Shell script for ASM Metadata

  • From: "Sanjay Mishra" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "smishra_97" for DMARC)
  • To: "Chris.Ruel@xxxxxxx" <Chris.Ruel@xxxxxxx>, "dmarc-noreply@xxxxxxxxxxxxx" <dmarc-noreply@xxxxxxxxxxxxx>, Oracle-L Freelists <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 15 Sep 2016 22:02:13 +0000 (UTC)

Thanks Chris 

    On Thursday, September 15, 2016 4:58 PM, "Ruel, Chris" <Chris.Ruel@xxxxxxx> 
wrote:
 

 #yiv7963515894 #yiv7963515894 -- _filtered #yiv7963515894 
{font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv7963515894 
{panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv7963515894 
{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv7963515894 
#yiv7963515894 p.yiv7963515894MsoNormal, #yiv7963515894 
li.yiv7963515894MsoNormal, #yiv7963515894 div.yiv7963515894MsoNormal 
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv7963515894 a:link, 
#yiv7963515894 span.yiv7963515894MsoHyperlink 
{color:#0563C1;text-decoration:underline;}#yiv7963515894 a:visited, 
#yiv7963515894 span.yiv7963515894MsoHyperlinkFollowed 
{color:#954F72;text-decoration:underline;}#yiv7963515894 
span.yiv7963515894EmailStyle17 {color:#1F497D;}#yiv7963515894 
.yiv7963515894MsoChpDefault {font-size:10.0pt;} _filtered #yiv7963515894 
{margin:1.0in 1.0in 1.0in 1.0in;}#yiv7963515894 div.yiv7963515894WordSection1 
{}#yiv7963515894 I have this script.  I left out some code that sets our 
environment because it is pretty specific to our company and does a lot of 
custom stuff.  You can just use oraenv by itself.    ### Script: 
asm_metadata_backup.ksh    export ORAENV_ASK=NO export ORACLE_SID=$1    . 
/usr/local/bin/oraenv    export ASM_MD_DATE=`date '+%d_%b_%Y_%H%M'`    asmcmd 
md_backup /backup/oracle/asm/asm_metadata_backup_${ASM_MD_DATE}.bak > 
${ORA_LOGS}/asm_metadata_backup_${ASM_MD_DATE}.log    export ECODE=$?    if [ 
$ECODE  -eq 0 ]; then         echo "`date`" | mailx -s "ASM MetaData Backup 
Success For Cluster ${ORA_CLUSTER_NAME}" BACKUP_INFO else         echo "`date`" 
| mailx -s "ALERT! ASM MetaData Backup FAIL for Cluster ${ORA_CLUSTER_NAME}" 
BACKUP_ALERT fi    # Remove ASM Metadata Backups Older than 14 days: find 
/backup/oracle/asm -mtime +14 -exec rm -f {} \;    This above then runs with an 
argument from cron:    # Daily ASM Metadata Backup # 45 03 * * * 
~grid/scripts/asm/asm_metadata_backup.ksh +ASM1 1> 
~grid/scripts/logs/cron_asm_md_backup_$(date +\%Y_\%m_\%d_\%H\%M).log 2>&1    
You’ll might have to hack it a little bit to get it to work for you but I think 
the basics are clear…    Chris…    
_____________________________________________________________________ Chris 
Ruel * Oracle Database Administrator * Lincoln Financial Group cruel@xxxxxxx * 
Desk:317.759.2172 * Cell 317.523.8482    From: oracle-l-bounce@xxxxxxxxxxxxx 
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Sanjay Mishra
Sent: Thursday, September 15, 2016 4:36 PM
To: Oracle-L Freelists
Subject: Shell script for ASM Metadata    Hi    Can anyone please share the 
shell script you are using to take ASM metadata using md_backup command ?    
Thanks Sanjay Notice of Confidentiality: **This E-mail and any of its 
attachments may contain 
Lincoln National Corporation proprietary information, which is privileged, 
confidential,
or subject to copyright belonging to the Lincoln National Corporation family of 
companies. This E-mail is intended solely for the use of the individual or 
entity to 
which it is addressed. If you are not the intended recipient of this E-mail, 
you are 
hereby notified that any dissemination, distribution, copying, or action taken 
in 
relation to the contents of and attachments to this E-mail is strictly 
prohibited 
and may be unlawful. If you have received this E-mail in error, please notify 
the 
sender immediately and permanently delete the original and any copy of this 
E-mail 
and any printout. Thank You.**

   

Other related posts: