Database Backup and Recovery (MOSC)

MOSC Banner

An oldie but a goodie. How, in Oracle 11.2.0.4 RMAN do I add date to a TAG? I've found discussion on

edited Sep 6, 2017 5:00AM in Database Backup and Recovery (MOSC) 6 commentsAnswered

So what I want is, within the RMAN job to have the date show up so I can see it when I do "LIST BACKUP SUMMARY".

Here's the goal -

run{

backup as compressed backupset incremental level 1 tag MERCQC_DIFF_$DATE

format '/u08/oradata/rman_backups/mercqc/diff/mercqc_%t_%U.bkp'

database;

BACKUP CURRENT CONTROLFILE;

BACKUP SPFILE;

}

Here's what I've tried -

1)export date outside of RMAN & pass it through

#!/bin/sh

export TODAY=`date +%m%d%y`

export TAG=MERCQC_ARCH_$TODAY

-------

rman target / nocatalog using $TAG

-------

run{

backup as compressed backupset incremental level 1 tag $TAG

-------

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center