Oracle RMAN: backup file format specifiers
Reference of the RMAN and LOG_ARCHIVE_FORMAT substitution variables used to name backup and archive files.
Format specifiers let you customize RMAN backup file names (the FORMAT option) as well as the LOG_ARCHIVE_FORMAT parameter.
RMAN substitution variables
| Variable | Meaning |
|---|---|
%a |
Database activation ID |
%b |
Base file name (only valid for SET NEWNAME and image copies) |
%c |
Backup piece copy number |
%d |
Database name |
%D |
Day of month (DD) |
%e |
Archived log sequence number |
%f |
Absolute file number |
%F |
System-generated name (see below) |
%h |
Archived redo log thread number |
%I |
DBID |
%M |
Month (MM) |
%N |
Tablespace name |
%n |
Database name, right-padded with x (e.g. TESTxxxx) |
%p |
Piece number within the backup set |
%s |
Backup set number |
%t |
Backup set timestamp (use with %s to get a unique name) |
%T |
Date (YYYYMMDD) |
%u |
Short system-generated file name (see below) |
%U |
Long system-generated unique file name (see below) |
%Y |
Year (YYYY) |
%% |
The % character |
System-generated names
%Fproduces a name in the formatc-IIIIIIIIII-YYYYMMDD-QQ, whereIIIIIIIIIIis the DBID,YYYYMMDDa timestamp andQQa sequence number in hexadecimal.%uproduces an 8-character name built from compressed versions of the backup set (or image copy) number and the time the name was generated.%Uproduces a unique name that differs for backup pieces and image copies:- for backup pieces it is equivalent to
%u_%p_%c; - for datafile image copies:
data-D-%d_id-%I_TS-%N_FNO-%f_%u; - for archived redo log image copies:
arch-D-%d_id-%I_S-%e_T-%h_A-%a_%u; - for control file image copies:
cf-D_%d-id-%I_%u.
- for backup pieces it is equivalent to
LOG_ARCHIVE_FORMAT
| Variable | Meaning |
|---|---|
%s |
Log sequence number |
%S |
Log sequence number, zero-filled |
%t |
Thread number |
%T |
Thread number, zero-filled |
%a |
Activation ID |
%d |
Database ID |
%r |
Resetlogs ID, which ensures unique names for archived log files across multiple incarnations of the database |