You are on page 1of 6

Databases backup Strategy

Contents
Databases that are backed up...............................................................................................2
Changes made from the previous backup strategy..........................................................2
Backups Performed Against CPR_DATA........................................................................2
Backups performed against other databases....................................................................3
Backup Retention period.....................................................................................................3
Backup retention on Disk................................................................................................3
Backup retention on Tapes...............................................................................................4
Monthly Backups.........................................................................................................4
Weekly Backups..........................................................................................................4
Daily Backups..............................................................................................................5
How backups are stored on Tapes....................................................................................5

Databases that are backed up


GENERAL Database that is used for general purposes
(reporting errors, Leave requests etc.)
FCPR Accounting Database
Intake_Archive Database for storing the archive information
of Personal Information forms
CPR Database that serves for payroll application.
CPR_DATA Our Production database, pension database
Master Database on which runs SQL Server
MSDB Database which stores all users, history of backups etc.
Changes made from the previous backup strategy
Introduction of Transaction Log backups for CPR_DATA- purpose of this
is to decrease the size of the backup file, thus we can make more
backups during the day and the resulting file will be smaller than
before.

Backups Performed Against CPR_DATA


Currently there are three types of backups that are performed against
database using SQL Server Backup Utility:
1. Full Backup - Which backs up all data from the database (copy
of database).
2. Differential Backup This operation backs up only changes
made since the last full backup.
3. Transaction Log backup with this type of backup, we backup
changes only from the last backup.

Fig1 CPR_DATA backups performed during the week

From the figure above, we see that the cycle of backups starts on
Friday at 04:35pm with a full backup executed against the database,
and then from Monday Thursday four Transaction Log backups are
performed during each day (fig1) and at the end of each day a
differential backup is performed at 04:45pm. On Friday only
Transaction log backups are performed (fig1), instead of executing
differential backup at the end of the day, we execute full backup.
Backups performed against other databases
During the week databases are backed up as follows:
GENERAL: From Monday till Thursday, at the end of the day, differential
backups are performed against the database, then on Friday full
backup is performed against database.
Same backup strategy is used also for databases listed below:
GL_CPR, Intake, CPRD.
Master, msdb: since these database are small, Full Backups Against
these databases are performed every three hours between 08:30 AM
and 05:00 PM.

Backup Retention period


Backup retention on Disk
During the day all performed backups are saved on the Local Disk, on
separated folders depending on the type of backup (fig2 step 1). At
5pm backups are gathered to a single folder from all separate folders,
this folder has a structured name (example: BackupDBs_20070625
step 2) and it is ready to be backed up to tape. The next day Sys
Admin backs up that folder to tape using windows backup utility (fig2
step 3). We would suggest that backups be made to tape on the same
day; this will decrease the possibility of loosing backups if HDD
crashes.
Backups are kept on disk until the backup disk is full (usually the whole
week, than are manually deleted by DBA to release disk space), by
keeping the backups on disk we can restore the database quickly
without having to retrieve the backup from the tape.

Fig2 backups performed during the day against databases

Backup retention on Tapes


Monthly Backups
The size of backups (all databases) together at the beginning of the
month is 22 GB. Since one DLT tape can store up to 80 GB of files, we
can save backups of three months in one tape, considering that we
have 5 DLT tapes to store monthly backups (with monthly and weekly
backups Im referring to backups of one of Fridays, which are full
backups of all databases), all together we can save backups of 15
months, in other words if we want to do a restore of the database, we
can go 15 months back in each month. After that, the oldest DLT tape
has to be deleted, which erases backups of 3 months (we can not
erase only a part of the DLT tape).
Weekly Backups
For weekly backups we have 6 tapes, same as with monthly backups,
right now we can store backups of 3 weeks in one single tape,
considering that the fourth or fifth week is monthly, we can say that
right now we can save 4 weeks of weekly backups on tape, times 6
tapes, all together make 24 weeks, which is approximately 6 months,
after that, the oldest tape has to be erased, than if we want to restore
the database in the dates earlier than 6 months, we have to use
monthly backups, with which we will not be able to restore the
database precisely in each date we want, only in the beginning of the
month.
If we consider that our backup size next year will grow for 50% (by
taking as a pattern 07/2006 07/2007 from fig3), than our average
backup size will be 30GB, thus we wont be able to store more than 2
backups in one tape, as a result, we can save only 10 months of
4

monthly backups, and 4 months of weekly backups. Figure Fig3 shows


database CPR_DATA and its growth during 2005-2007.

Fig3 CPR_DATA size growth by month

Caution: DLT tapes for storing weekly backups are almost full, so in
order to increase the period of weekly backups, we have to buy new
DLT tapes as soon as possible.
l
Daily Backups
We have four tapes to store daily backups. Daily backups are small and
we can keep them as long as weekly backups are kept on tapes. After
deletion of weekly tapes daily backups become useless, because for
restoring a database using daily backup we need a weekly backup.
How backups are stored on Tapes
Assume that we have 3 monthly backup tapes and on each tape we
can store 3 database backups. The sequence is as follows: we use first
tape to store first backup (as it shows on fig4, backup of January), then
the second tape to store the second backup (February), we use third
tape for the third backup (March). For the fourth backup we again use
first tape, and so on till all the tapes become full.

Fig4 the sequence of using tapes to store backups

After all the tapes are full, we have to erase the oldest one in order to
store more backups (our case tape 1), as a result of this, we loose
backups of three months (fig 5). As we Explained earlier, when the
tape becomes full, we can not remove only one backup, but the tape
has to be erased completely.
Using this sequence of storing backups on tapes, gives as a possibility
not to loose backups of 3 months together. For instance, if we erase
the tape which stores the backup of January (fig5) we have second
tape which stores backup of February, thus we cannot restore the
backup of January but we can be near.

Fig5 tape deletion after is full