Database Reference
In-Depth Information
Online and offline backups
An online backup, which should really be the default, backs the database up while it is up and running. In order to
take an online backup the database must be in archivelog mode. In other words, used online redo logs must be safely
stored away by one of the archiver processes. An online backup by definition is inconsistent. This means that Oracle
has to use the (backed up) archived logs to bring the database to a consistent state-a process called media recovery.
Offline backups, or RMAN backups taken while the database is in mount mode, are consistent if the database
has been shut down cleanly. However the shut down and subsequent time to take the backup are a service outage; no
user can access the database. For many scenarios this is hugely undesirable. The only upside to consistent backups is
that no media recovery is required. Offline backups are usually taken only for databases which do not have archivelog
mode enabled. And there should not be many of these anyway.
not using archivelog mode for a database is definitely a Big problem for anything other than play
databases! you are almost guaranteed to lose data operating in noarchivelog mode, the question is not whether or not
to lose it but when.
Caution
Backup destinations
Another important aspect is the destination of the backup. Oracle offers two different destinations: either to disk,
which is the default, or using a media manager. The media manager is accessed via a dedicated API Oracle makes
available to third-party vendors. Using this API any third party can write software to interact with RMAN and storage
libraries. Tape libraries and their virtual cousins are the most common source of longer-term backups. The beauty of
this approach is that except for a short initialization section at the beginning of an RMAN session all commands are
portable across any other environment.
The configuration of your Media Manager can be quite time consuming. The easiest way to deploy it is via your
platform's package manager. If you are lucky and your vendor understands the platform well you get more than a
simple installation script. Instead you get a package you can add as a dependency into your standard database server
operating system build. The configuration options for tape backups are so many that they have not been included in
the chapter. Very often however you can simply substitute the initialization of disk channels with tape channel (SBT-
System Backup to Tape) to back up to tape instead.
Using a dedicated media manager usually involves extra cost for the software, which is why many environments
perform a two staged Backup strategy:the RMAN database backup goes to a dedicated area on disk, from where
it is backed up using a “normal” disk backup to tape. Disk in this respect can and maybe should be on a different
host. In the UNIX world NFS seems to be a popular choice, and Oracle offers hardware solutions for this purpose.
Most backups to disk are likely to complete as quick if not quicker than tape backups. If a low-enough storage tier
is selected for them, then the cost advantage of tape drives can also partially be offset. The downside to the two-
staged approach is that for a backup which is not on disk you first have to restore from tape to disk. Hopefully your
backup area can take more than just one backup, otherwise you might have to remove the existing backup first.
After the tape restore you have to initiate the RMAN restore and recover commands. All of these tasks will take time,
and as with any critical operation should be documented well and practiced regularly. It is very important to stress
that there is little worse during a restore than to find out that the a few crucial archived logs have not been restored
from tape to disk.
Which approach you end up taking in the end will most likely depend on budget. If your organization has a
favorable licensing deal with your backup vendor, then a direct integration of RMAN and the media manager is
desirable. In most other cases you might end up with the more important databases being backed up to tape directly,
whereas the lower tier databases probably will be backed up to disk first, then to tape.
 
 
Search WWH ::




Custom Search