S 6.49 Data backup in a database

Initiation responsibility: IT Security Officer, Head of IT

Implementation responsibility: Administrator

It is generally impossible to make a full backup of the data in a database system using data backup programs running on the operating system level. In most cases, such data backup programs are just one link in a chain and are only used to write the data to be saved on a backup medium. Instead, it is necessary in most database products to additionally use the corresponding service programs offered by the DBMS to back up the DBMS and the data.

The easiest way to back up a database, which is also the most secure way at the same time, is to create a full backup of the database when the database is shut down. In this case, all files belonging to the database are saved to the backup medium. However, this procedure usually cannot be used due to the availability requirements regarding the database or due to the amount of data needed to be backed up.

One alternative to the full backup described above is to back up the database online. In this case, the backup can be performed during live operation of the database, i.e. the database does not have to be shut down. The disadvantages of this type of backup include that inconsistencies cannot be explicitly ruled out and that a full (offline) backup must be available nevertheless if the database is destroyed as a secure basis for the restoration of the online backups. For this reason, online backups should only be performed when the database needs to be available at all times. Nevertheless, full offline backups should be performed at reasonably long intervals.

Partial database backups are another possibility. They should always be used if the amount of data to be backed up is too large to enable the generation of a full backup. This may be the case if the capacity of the backup media is inadequate or if there is not enough time available to create a full backup.

If possible, all transactions completed between two full offline backups should be archived in any case. Oracle offers this capability, for example, by enabling the so-called ARCHIVE mode for the database. Transactions are recorded in Oracle in log files, of which there are several. These are filled consecutively and once all log files are full, the first log file is overwritten. The ARCHIVE mode creates backup copies of these log files before they are overwritten. In this manner, it is possible to completely reconstruct all transactions in the event of the destruction of the database. However, the existence of a full backup of the database is still a prerequisite for complete reconstruction. The amount of time required for such a recovery increases as the number of archive log files to be restored increases.

A separate data backup policy must be drawn up to govern the data backup procedure for a database system. Factors influencing such a policy include the following:

Based on this information, a policy for backing up the data in the database can be drawn up. The following, amongst other things, must be specified in this database backup policy (see also module S 1.4 Data backup policy):

Example:

Backups from Monday through Saturday:

Backup on Sunday

Review questions: