Create Full Backup With Rman

If you don't still configure rman, please go here.

Checking if backup is necessary

Suppose that you don't remember when was your last backup, or you don't remember what you backup last. In these last cases, you can let RMAN tell you if something needs to be backup since your last backup :

RMAN> report need backup;

And if you still didn't do any backup, it will show you all your datafile in the database, something like that :
RMAN> report need backup;

using target database control file instead of recovery catalog
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of files with less than 1 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
1    0     /u01/app/oracle/oradata/oraasz/system01.dbf
2    0     /u01/app/oracle/oradata/oraasz/undotbs01.dbf
3    0     /u01/app/oracle/oradata/oraasz/sysaux01.dbf
4    0     /u01/app/oracle/oradata/oraasz/users01.dbf
5    0     /u0/oradata/small_tables01.dbf
6    0     /u0/oradata/large_tables01.dbf
7    0     /u0/oradata/indx01.dbf

Create a full backup

You simply have to do this in your rman prompt :

RMAN> backup incremental level 0 database plus archivelog;

And with this backup, you will be able to restore the database consistently. Note that archivelog are important to do that !

After that, if you want to do an incremental backup, please follow this link

If you want to only backup a certain datafile. You can also do it, it will take less time of course.
It's nearly the same as the last command :

RMAN> backup incremental level 0 datafile '/the/path/to/my/datafile.dbf';

I specified the full path where the datafile is. By this way, you can of course also do an incremental backup, let's check it here.

Limit time of a Full backup

When doing your backup, you won't probably will that it continue during business hour. You can specify an amount of time that a backup do his job, and if it does not finish within this time, it will abort and won't continue. This can be done with this command :

RMAN> backup duration 06:00 database;

So, with this last command, if after 6 hour, the backup still don't yet finished, rman will abort, and won't continue doing the backup, and will erase any backup created during this time !

Minimize load on system

If you want to minimize impact of doing backup on your database, during the time that the backup is allowing to run with rman, then run this :

RMAN> backup duration 06:00 minimize load database;

Minimize time of the backup

You can also force rman to rush it, I means by running faster and surely impact more the performance of the database :

RMAN> backup duraction 06:00 minimize time database;


Read the next comments if you want more information and more options about this command.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License