RMAN Data Files Backup
Published by : Obay Salah , November 19, 2024
You can create a backup of the Data Files using RMAN, provided that the database is in the Mount or Open state.
The Recovery Catalog Database must be open, and there are several options for performing a backup of the Data Files:
- Data Files Backup as Backup Set.
RMAN> BACKUP AS BACKUPSET DATAFILE 1,2 TAG ‘FILE(1,2)’;
Note that I have created a backup for each of the Datafile 1 and 2, and the numbers 1 and 2 refer to the File ID.
Of course, you can write the name of the Data File instead of writing the File_Id. You can find the File_Id by using the following query:
SELECT FILE_NAME,FILE_ID FROM DBA_DATA_FILES;
As we have named this backup copy with a tag using the variable TAG and named it (1,2)FILE, as illustrated,
You can also notice that we did not create channels for the backup manually; instead, RMAN used the automated configuration setting.
Generally, we can verify the success of the backup process using the LIST command, which presents details of the backups.
If we write LIST BACKUPSET SUMMARY
, this command will display all the backup copies stored in the Recovery Catalog of the Backup Set type.
On the other hand, the command LIST COPY
shows details of the backup copies of the IMAGE COPY type and other commands that we will discuss later.
Now, we need to confirm the backup we just created, and note that its logical name is "(1,2)FILE", and we can view its details using the command
LIST BACKUPSET TAG FILE (1,2)
If you did not assign a logical name to the backup copy, RMAN will automatically assign it a logical name. You can also view information about the previous backup using the command
LIST BACKUP OF DATAFILE 1,2
RMAN>LIST BACKUPSET TAG “FILE(1,2)”;
2- Data Files Backup as Image Copy
RUN { ALLOCATE CHANNEL D1 DEVICE TYPE DISK; ALLOCATE CHANNEL D2 DEVICE TYPE DISK; BACKUP AS COPY DATAFILE 3,4 (DATAFILE 3 CHANNEL D1) (DATAFILE 4 CHANNEL D2) ; }
We created a backup copy for the (3,4) Data Files of the type Image Copy, and we manually created two channels and sent the backup files to the disk.
You can verify the success of the backup process using the command
LIST COPY OF DATAFILE 3,4
RMAN>LIST COPY OF DATAFILE 3,4;
Comments
no comment yet!