HCLBACKUP

updated

17 years ago

H

HCLBACKUP

2 Intern

150 Posts

0

1421

November 2nd, 2009 04:00

Appending Date in Log File

Hi,

I am using NMO for oracle backup. In the nsrnmo script I have specified the log file name as RMANlog.log. Everyday backup is happenning the logs are appended to this. It becomes very difficult at the time of troubleshooting to analyze the logs.

Is there a way that I the logs should be created in separate file everyday say RMANlog_11_02_09 and RMANlog_11_03_09.

Thanks in advance.

HCLBACKUP
  • ble1

    6 Operator

    14354 Posts

    56186 Points

    914

    0

    Posted November 4th, 2009 11:00

    Then remove append and place in crontab job which moves RMAN_BKP.log to RMAN_BKP.log.`date` or something that you wish on daily basis.
  • ble1

    6 Operator

    14354 Posts

    56186 Points

    914

    0

    Posted November 3rd, 2009 12:00

    I assume you are referring to msglog... did you use keyword append?
  • HCLBACKUP

    2 Intern

    150 Posts

    914

    0

    Posted November 4th, 2009 01:00

    Hi Crveline,

    Yes I use the keyword append in that. The syntax I am using is:

    NSR_RMAN_ARGUMENTS="nocatalog msglog '/nsr/applogs/RMAN_BKP.log' append"

    But I need to create new file everyday. If I am removing the append keyword it overwrites the file which means I will not be able to see old logs, which I dont want.

    I need everyday new file with date in its name say RMAN_BKP_11042009.
  • HCLBACKUP

    2 Intern

    150 Posts

    914

    0

    Posted November 5th, 2009 04:00

    Thanks Crveline.
  • salvoemc

    45 Posts

    914

    0

    Posted March 12th, 2015 15:00

    Use this option:

    NSR_RMAN_ARGUMENTS:"msglog /nsr/apps/logs/DB_LEVEL_msglog_`date +%y_%m_%d_%H_%M_%S`.log"

    The output will be:

    DB_LEVEL_msglog_15_12_03_18_50_15.log