-
including readable timestamp in RMAN backup pieces
When I do a backup in RMAN, it allows me to specify the name of the backup pieces via "format". However, it only provides %t to specify the timestamp, which is a number of seconds elapsed since a certain time. Is there a way to specify in my RMAN script that creates backup pieces with more readable time like 2003-05-29 as part of the filename?
Thanks,
-
You did not mention the Oracle version. I'm running 9.2
and I us %T
My format string is: rmanHOT_BOSCO_%d_t%T_s%s_p%p
and my file names looks like:
rmanHOT_BOSCO_t20030529_s1036_p1
HTH
-
Thanks gopi. I am using 8.1.7.3 but I don't think it supports %T. When I specify it with %T, it puts in literally %T.
-
Hi
You can try using
RMAN> run{
host 'echo Backup stored in logfile (logrman.txt) taken on ->d:
\oracle\ora81\rmanbkp\rmandate.log';
host 'time /T>>d:\oracle\ora81\rmanbkp\rmandate.log';
host 'date /T>>d:\oracle\ora81\rmanbkp\rmandate.log';
}
This will produce a file that has -
Backup stored in logfile (logrman.txt) taken on -
16:57
05-Sep-2002
TIMESTAMP FOR UNIX
--------------------
To get time / date displayed during an RMAN operation the OS command (date)
should be used.
To display a timestamp in the RMAN log, run something similar to the following -
RMAN >run{
allocate channel a1 type disk
.
.
.
HOST 'date';
release channel a1;
}
Output looks like -
RMAN-03022: compiling command: host
Wed Jul 24 16:31:06 BST 2002
RMAN-06134: host command complete
Alternatively this also works
BACKUP DATAFILE 7 FORMAT 'c:\RMANBKUP\file7_%T_%s_%p';
-- Notice that we use %T for the date, %s for the backup set number,
-- and %p for the piece number.
regards
Hrishy
Last edited by hrishy; 05-30-2003 at 01:51 AM.
-
Originally posted by a128
Thanks gopi. I am using 8.1.7.3 but I don't think it supports %T. When I specify it with %T, it puts in literally %T.
Search for 'format_string' on this page and you will get the list of available format strings.
http://download-west.oracle.com/docs...syn6.htm#15554
HTH
Amar
"There is a difference between knowing the path and walking the path."
-
Thanks for all the inputs.
I searched through the documents and am pretty sure in 8i, I can't make it include current date as part of backup piece file name. However, as gopi mentioned, in 9i, there is a %T option let me do that. Too bad I am still on 8i.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|