LLI Wiki — My Digital Knowledge Base

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

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
Mastodon LLIMastodon SocialFosstodon