Introduction: The One-Step Database Backup
Commercial Backup Software usually supports direct database backup.
This method is very popular and considered as "best practice".
However, the required Database Agent software module for your backup software may cost extra. In this case a 2-step backup process is frequently used, but not free of risks.
The Principle of Two-Step Database Backup
[B.1] At 22:00 a database backup to local file system /u01/db_backup is started and finishes at 23:50.
[B.2] 2 hours 10 minutes later, at 2:00 am those backup files are backed up (copied) to tape.
This sounds really simple.
The Risk of Two-Step Database Backup
Risk: Due to growth of database size over time, the backup step [B.1] backup to local file system is not finished, when step [B.2] starts.
This results in an invalid backup.
The backup process has been introduced in January.
Step [B.1] starts at 22:00 and finishes at 23:50. The time buffer until start of second step [B.2] at 2:00 am is 2 hours 10 minutes.
In July step [B.1] runs already until 01:20 am, leaving just 40 minutes reserve until start of step [B.2].
In December first step [B.1] runs until 2:40 am, overlapping 40 minutes with second step [B.2] => This backup is unusable very likely already since several weeks!
|B.2.a||Step [B.2] is scheduled at fixed time||Risk: Step [B.2] starts before step [B.1] is finished.|
|B.2.b||Step [B.2] is initiated from tape library: The tape library has a list of servers to be backed up, and works through that list.||The time when the backup to tape for your database starts, depends on the time the tape library has spent on servers backed up before. This time can vary.
Risk: Step [B.2] starts before step [B.1] is finished.
|B.2.c||Step [B.2] is part of a workflow, and only triggered after successful end of step [B.1]||In this case the database server is pushing the files to the tape library only after step [B.1] is finished.
OK - There is no risk of time overlap.
This works for a database server with a local dedicated tape drive or a dedicated backup channel at the tape library.
Risk: However, at that time all channels / drives of the tape library might be busy. If no sleep/retry loop is implemented, the backup would fail.
Having a channel / drive on tape library reserved for your database server is an option, but in that case one channel of the tape library might be unused for too long time. As tape libraries are very expensive, the previous scenario B.2.b is very common to optimize the utilization of the tape library.
|One-Step Database Backup||
|Two-Step Database Backup||
Eliminate that risk!
- Consult with experts knowing your backup system about options to ensure that second backstep won't start before first backup step finished.
- Set this effort into relation to costs for database backup agent
More details about backup you find in our Service / Operations Level Agreement (SLA / OLA) for Backup and Recovery