Which backup files are needed for a successful restore

backuporacle-xerecoveryrman

Considering the built-in 'Backup Database' script (backup.bat) that comes with a new installation of the Oracle Express 11g Edition, after finishing the script execution, what folders/files should be copied to an external media (XCOPY backup) so the database could be fully restored the database after a new install?

Environment:

Windows Server 2003
Database is in ARQCHIVELOG
Datafiles/Tablespaces are set-up as default (user data is being allocated in USERS Tbs)

I have a guess that the folder [InstallDir]\oraclexe\app\oracle\fast_recovery_area should contain all of what I need, but I'm afraid it isn't enough.

PS: Question moved from ServerFault: https://serverfault.com/questions/413762/oracle-database-11g-express-edition-built-in-backup-files-to-be-saved (too old to migrate)

Best Answer

The included backup.bat (windows) or backup.sh (all other platforms) script found under $ORACLE_HOME/config/scripts will do the following:

  • Check that the user running the script is in the DBA or DBOPER system groups
  • Check that the database is in archivelog mode and have the FAST_RECOVERY_AREA parameter configured.
  • Back up the database to the fast recovery area under XE/backupset (online/warm backup using RMAN)
  • Create a pfile as $ORACLE_HOME/XE/dbs/spfile2init.ora
  • Autobackup control file and SPFILE to the fast recovery area under XE/autobackup/
  • Switch to the next online redo log file, letting the current one be archived
  • Create a log of the backup operation, in the user's home directory

The archive logs are already located in the fast recovery area under XE/archivelog

Note that the PFILE is created in the oracle home, but it is not required to restore the database, not even to a new server. Everything you do need is located in the Fast Recovery Area.

That's not to say that it's not a good idea to additionally back up the oracle home.