RMAN backup refers to the method for backing up data files, control files, archiving logs and spfiles using Recovery Manager.
In addition, because RMAN backup is completed by the Target Database server process, when RMAN is used for backup, the Target Database must be in the MOUNT or OPEN state.
When you use RMAN to perform the backup operation, you must allocate a channel, and the RMAN backup is completed by the server process corresponding to the channel.
3.1 Create Backup Set
Database (Full) Backup Set
RMAN> backupdatabaseformat = '/home/Oracle/rman /';
Tablespace Backup Set
RMAN> backuptablespace [name] format = '/home/oracle/rman/% n _ % s. Bak ';
Datafile Backup Set
RMAN> backupdatafile [n] format = '/home/oracle/rman /';
Controlfile Backup Set
RMAN> backupcurrent controlfileformat = '/home/oracle/rman/% d _ % s. ctl ';
E.g. [include current controlfile];
SPFILE Backup Set
RMAN> backupspfileformat = '/home/oracle/rman/% d _ % s. ora ';
Archivelog Backup Set
RMAN> backup format = '/home/oracle/rman/% d _ % s. arc'
2> archivelogfrom time = 'sysdate-1 'until time = 'sysdate ';
RMAN> run {
2> allocate channel c1 type disk;
3> SQL 'alter system archive log current ';
4> backup archivelog all
5> format = '/home/oracle/rman/arch _ % d _ % s _ % p _ % T ';
6>}
E.g. [plus archivelog];
RMAN> list backupset of archivelog all;
Parallconfiguration Backup Set
Duplexed Backup Sets
RMAN> backup copies [n] tablespace [name]
2> format = '/u01/bak1/% N _ % s. dbf','/u01/bak2/% N _ % s. dbf ',
3> '/u01/bak3/% N _ % s. dbf ';
RMAN> backup backupset [n] format = '/u01/bak1/% N _ % s. dbf ';
RMAN> configure channel device type [name]
2> maxpiecesize 4G;
RMAN> backup device type [name] format''