TechKnowSurge
VideoSecurityFree

Databases and Backups

Backup types — full, differential, incremental, and synthetic — each handle database transaction logs differently, and understanding that distinction is key to designing and managing effective backup strategies.

Complete this video to capture a CTF flag worth 1 point.

About this video

Relational databases organize information into tables made up of rows and columns, where each row represents a record and each column represents a field such as a name, address, or other attribute. Multiple tables can be linked together, and the entire structure is ultimately stored as a file on disk. What makes databases particularly relevant to backup strategy is that new data doesn't flow directly into that main file — instead, changes are written first to a separate transaction log, which accumulates entries until it is committed and merged into the primary database file. When the database is queried, the system combines what's in the main file with whatever pending transactions exist in the log to present a complete and current view of the data. Different backup types interact with this architecture in distinct ways. A full backup copies the entire database file along with any outstanding transaction logs, then rolls those logs back into the main file so everything is consolidated in one place. A differential backup skips the main file and instead captures only the transaction logs, leaving them intact and allowing them to continue accumulating changes. An incremental backup also targets the transaction logs, but after copying them it commits and merges them into the main database file and starts a new log from that point forward. Understanding how each backup type handles transaction logs is essential for building a strategy that balances storage efficiency, recovery speed, and data protection.

What you'll learn

What's covered

Database Backup Types

Key terms

Full Backup
A complete copy of all selected data, serving as the baseline backup type from which other backup strategies operate.
Differential Backup
A backup type that copies only the data that has changed since the last full backup.
Incremental Backup
A backup type that copies only the data that has changed since the last backup of any type, minimizing storage use but requiring multiple restore steps.
Transaction Log
A file maintained by a database that records every change made since the last commit, allowing the database engine to roll back incomplete operations or replay changes to restore a consistent state after a failure.
Recovery Point Objective
RPO
The maximum acceptable amount of data loss measured in time, defining how far back data must be recoverable.
Disaster Recovery
DR
The process and procedures for recovering IT systems and data following a disruptive event.

Topics

Database Backup Transaction Logs Incremental Backup Differential Backup Backup Recovery Data Management

Transcript

Why databases come first

We are going to be looking at backup types, whether it be full, differential or incremental. We will also look at synthetic backups. But one of the things I want to do is show how databases get backed up, because it is fascinating and drives home the point of these different types of backups. In order to really fully understand that, we have to understand how databases work.

What a database is

What is a database? A database stores information. Sometimes it is structured, sometimes it is not structured. But let's look at a structured relational database.

Let's first of all imagine we want to store a bunch of people's, well, let's say it is their names and addresses and so on and so forth. So we are going to store a bunch of customer records. A record is a row. Think of an Excel sheet, or a Google Sheets, or some sort of spreadsheet software, where you have these different rows, and each row is going to be a customer. Along there we have columns, and each column is going to be a field: one of them is going to be first name, one will be last name, one of them will be address, city, state, country, so on and so forth.

So this makes up a table. A table has columns and it has rows. Each row is a record, and then each column is a field. Then what happens is those go into a database, and the database has multiple tables, and then it interrelates this information amongst these different tables.

A database is a file, plus a transaction log

Now, we are concerned more about the backup stuff, so what does this look like? A database is actually just a file. These rows and columns and databases all get put into some sort of format, which is just in a file that is stored in file format.

Here we have our table right here, and what we want to do is add to this table. So we are going to start adding more and more customer records to this table. Here are the rows that we are adding. These additions actually do not go directly into this file. Instead they go into a different file called a transaction log.

So these are the transactions. We are adding users, and so each one of these users is going to be a transaction that gets added to this transaction file. Then at some point in time this transaction file gets what we call committed, and rolls up into the main database file. When you are looking at a database, what it is doing is taking the stuff that is in the actual database file, the database, and then adding all of the transactions to display the actual information.

What this means for backups

So what does this have to do with backups? If it is a full backup, then it is just going to take all this information and back it all up. But the other thing that happens with a full backup is that all of these transaction logs get rolled back into the main file, and so now everything is part of the one file. So that is the full right there.

Now, the differential and incremental do not take a copy of the main database file, and there are reasons for that, which we will discuss. But what it is going to do is just take a copy of the transaction logs. If it is a differential, then it is going to just leave those transaction logs and keep adding to them. If it is an incremental, then what it will do is roll these transaction logs back into the main file, and then it will start a new batch of transaction logs.

Once again, there are reasons for all this that we will get into, but just know that how databases get backed up, and how it treats these transaction logs, depends on what type of backup we are taking, what type of backup we are using.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →