Differential backup. Backing up data using Windows OS

Greetings, dear site visitors! Let's continue the topic we started in the last post of this section and this time we will take a closer look at how incremental backups are performed.

Each data block in the data file contains a system change number (SCN), which is the SCN on which the new change in the block was made. During the incremental Reserve copy RMAN reads the SCN of each block of data in the input file and compares it to the SCN checkpoint parent incremental backup. If the SCN in the input data block is greater than or equal to the SCN of the parent's checkpoint, then RMAN copies the block.

Note that if you enable the block change tracking option, RMAN can refer to the change tracking file to identify changed blocks in data files without scanning the entire contents of the data file. Once enabled, block change tracking will not affect how you perform or use incremental backups but only offers improved performance.

Incremental Backups Tier 0 and Tier 1

Incremental backups can be level 0 or level 1. A level 0 incremental backup, which is the basis for subsequent incremental backups, copies all blocks containing data, backing up the data file to the backup set, just like a full backup. The only difference between a level 0 incremental backup and a full backup is that a full backup is never included in an incremental strategy.

A level 1 incremental backup can be one of the following types:

  • A differential backup that backs up all blocks modified since the last incremental backup at level 1 or 0
  • A cumulative backup that backs up all blocks changed since the last incremental backup at level 0

Incremental backups are differential by default.

The size of the backup file depends solely on the number of modified blocks and the level of incremental backup.

Differential Incremental Backups

In a level 1 differential backup, RMAN backs up all blocks that have changed since the last cumulative or differential incremental backup at level 1 or 0. RMAN determines which level 1 backup was last and backs up all blocks modified since that backup. If no level 1 backup is available, RMAN copies all blocks changed since the level 0 backup.

The following command performs a Level 1 differential incremental backup of a database:

RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;

If a level 0 backup is not available, then the behavior depends on the compatibility mode setting. If compatibility is >=10.0.0, RMAN copies all blocks changed since the file was created and saves the results as a level 1 backup. In other words, an SCN equal to the file's creation SCN is taken during an incremental backup. If compatibility<10.0.0, RMAN генерирует бэкап уровня 0 содержимого файла во время резервного копирования, чтобы не было противоречия с предыдущими релизами.

Figure 1 Differential Incremental Backups (default)

  • On Sunday
    Level 0 incremental backups all
  • Monday through Saturday
    Every day from Monday to Saturday, a level 1 differential incremental backup backs up all the blocks that have changed since the last incremental backup at level 1 or 0. So, a Monday backup copies blocks that have changed since a Sunday level 0 backup, a Tuesday backup copies blocks , changed starting backup level 1 on Monday 1, etc.

Cumulative Incremental Backups

In a level 1 cumulative backup, RMAN backs up all the blocks that have been used since the last level 0 incremental backup. Cumulative incremental backups reduce the work required for restores by ensuring that you only need one incremental backup from any given level. However, cumulative backups require more space and time than differential backups because they copy the work done by previous backups at the same level.

The following command performs a level 1 cumulative backup of the database:

BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE; # blocks changed from level 0

Figure 2 Cumulative Incremental Backups

In the example shown on , the following happens:

  • On Sunday
    Level 0 incremental backups all blocks that have ever been used in this database.
  • Monday through Saturday
    A cumulative incremental level 1 backup copies all blocks that have changed since the last level 0 backup. Since the last level 0 backup was taken on a Sunday, a level 1 backup every day from Monday to Saturday backs up all the blocks that have changed since the Sunday backup.
  • The cycle repeats over the next week.

A Simple Incremental Backup Strategy

Choose a backup scheme according to an acceptable MTTR (short for mean time to recover). For example, you can implement a three-tier backup scheme so that a full or level 0 backup is taken monthly, a cumulative level 1 backup is taken weekly, and a differential level 1 backup is taken daily. In this scheme, you will never have to apply more than one day's stock of transaction logs for a full recovery.

When deciding how often to take a full or level 0 backup, a good rule of thumb is to take a new level 0 backup every time 50% or more of the data has changed. If the rate of change in your database is predictable, then you can monitor the size of incremental backups to determine when to take the next level 0 backup. The following query displays the number of blocks written to the backup set for each datafile with at least 50% its reserved blocks:

SELECT FILE#, INCREMENTAL_LEVEL, COMPLETION_TIME, BLOCKS, DATAFILE_BLOCKS FROM V$BACKUP_DATAFILE WHERE INCREMENTAL_LEVEL > 0 AND BLOCKS / DATAFILE_BLOCKS > .5 ORDER BY COMPLETION_TIME;

Compare the number of blocks in differential or cumulative backups with a level 0 base backup. For example, if you create only level 1 cumulative backups, then after taking the next new level 1 backup with a size of approximately half the size of the level 0 base backup, take a new level 0 backup 0.

Thank you for your attention!.

Full, incremental and differential backups

Acronis Backup & Recovery 11 provides the ability to use popular backup schemes such as "grandfather-father-son" and "Tower of Hanoi", as well as create your own backup schemes. All backup schemes are based on full, incremental and differential backup methods. The term "scheme" really refers to the algorithm for applying these methods in combination with the algorithm for cleaning the archive.

Comparing backup methods with each other does not make sense, since they work together in the scheme. Each method should fulfill its own role according to its benefits. A good backup scheme allows you to use the advantages of all methods, while reducing the impact of their disadvantages. For example, weekly differential backups make it easier to clean up the archive because they are easy to delete along with a set of weekly incremental daily incremental backups that depend on them.

A backup using the full, incremental, or differential backup methods creates a backup of the appropriate type.

Full backup

A full backup stores all the data you choose to back up. A full backup is the foundation of any archive and forms the basis for incremental and differential backups. The archive may contain several full backups or consist of only them. A full backup is self-contained: you don't need access to any other backup to restore data from it.

It is widely known that a full backup is the slowest to create and the fastest to restore. With Acronis technologies, restoring from an incremental backup can be as fast as from a full backup.

Full backup is most useful in the following case:

  • you need to restore the system to its original state,
  • the original state rarely changes, so there is no need for regular backups.

Examples: an Internet cafe, a school or a university lab where the administrator often undoes changes made by students or guests, but rarely updates the base backup (only after installing software updates). The backup time is not critical in this case, and the recovery time will be minimal if you restore the system from a full backup. For added security, an administrator can have multiple full backups.

incremental backup

An incremental backup stores data changes relative to to the last backup. To restore data from an incremental backup, you need access to other backups from the same archive.

Incremental backup is most useful in the following case:

  • you want to restore one of several saved states,

It is widely known that incremental backups are less reliable than full ones, because if one copy in the "chain" is damaged, the following copies can no longer be used. However, keeping multiple full backups is not the best option if you need to have multiple previous versions of your data, because the reliability of an archive that is too large is even more questionable.

Example: backing up the transaction log of a database.

Differential backup

A differential backup stores data changes relative to last full backup. To restore data from a differential backup, you need access to the corresponding full backup. Differential backup is most useful in the following case:

  • only the last state of the data needs to be saved,
  • data changes are relatively small compared to the total size of the data.

It is generally believed that "differential backups take longer to create and recover faster, while incremental backups take longer to create and slower to restore." In reality, there is no physical difference between an incremental backup attached to a full backup and a differential backup attached to the same full backup at the same point in time. The above difference implies that a differential backup is created after (or instead of) multiple incremental backups.

An incremental or differential backup created after a disk defragmentation can be much larger than usual because the defragmentation process changes the location of the files on the disk and the backup reflects those changes. After defragmenting the disk, it is recommended to create a full backup again.

AT following table generally recognized advantages and disadvantages of each type of backup are indicated. In reality, these parameters depend on many factors, such as the amount, speed and nature of data changes, their nature, physical characteristics of devices, backup and recovery settings. The best teacher in choosing the best backup scheme is experience.

Parameter

Full backup

Differential backup

incremental backup

Disk space

Maximum

Minimum

Time of creation

Maximum

Minimum

Recovery time

Minimum

Maximum

Today we will consider the principles of organizing incremental and differential backups using the program.

Often users use APBackup to completely save data, for example, to the same directory or to different archives each time using , as well as the archive depth parameter. This works well on small amounts of data. But if, for example, every day it is necessary to archive a completely large amount of information (for example, several tens of gigabytes), then a full archive can take a long time, and slow down the computer. Although there is a mechanism that allows you to regulate the load on the computer processor (setting a low priority for the archiving process, automatic pauses in the archiving process, ..).

In this case, we will need to organize a backup using APBackup of only changed and new files since the last full backup, which will not take much time, especially in the case of backup to FTP.

What is the difference between incremental and differential backups? Let's say we made a full backup of the source directory and now every day we need to save changes to this directory. In the case of an incremental backup, every day the program will archive only new or changed files since the last backup (full or incremental). Thus, in order to restore the original directory in the event of a crash, we need a full backup and ALL incremental backups since the creation of this full backup. A differential backup will create an incremental backup of new and changed files every day since the full backup. Those. each next differential archive contains files included in all previous differential archives. When restoring, we only need a full archive and the LAST differential.

From the point of view of organizing backups, incremental and differential modes are similar, so in the future we will consider incremental mode in all examples.

So, for definiteness, let's say we need to organize a folder backup c:\work\ archive D:\backup\. We will do a full backup on Sundays (for example, a day off when no one is working with the server) and incremental backups every evening of the rest of the week.

The copy mode can be ANY, the program will work the same in any mode: Archiving (possibly using an external archiver), copying, copying to FTP. In our example, this will be archiving using an internal archiver.

So, for starters, let's create a task for organizing a full copy.

Let's name the task TEST_FULL, copy mode: "Archive", Backup type: "Keep all files"

Schedule: weekly on sundays.

Source: C:\WORK

To save the full archive, use the folder "d:\backup\", the archive has a prefix "FULL_" + date format. Depth = 1, i.e. only 1 last complete archive will be saved.

In principle, for reliability, you can copy the complete archive to additional directories on another server and even on FTP server in the same task.

Now that the full backup job is ready, you can create a copy of it to set up an incremental backup. A copy of the task can be made while in the main window of the program through the menu "Task"-> "Make a copy (F5)"

After the copy is created, the new job configuration window will open. We need to make the following changes in the new task:

Description: "TEST_INC", Backup type: "Only new and changed files (from the last archive)". This is just an incremental backup mode. To select the differential mode, you must select the copy mode: "Only new and changed files (since the last full archive)"

In the schedule, change the days of the week, select all days of the week except Sunday, when we will have a full backup

Bookmark "Saving archive" it is necessary to change the prefix of the archive to something different from that of the full copy, change it to "INC_". And also change the depth of the archive to 7 DAYS. Because to restore, we need ALL incremental backups since the full backup i.e. all copies in the last 7 days. In the case of differential copying, the depth can be set to 1 day, because we will need only the last archive.

Note that it is also possible to change the archive directory, for example, to store full backups on one disk and incremental ones on another.

After creating these two jobs, APBackup will work as intended, i.e. create a full backup on Sundays, and incremental backups on the rest of the week.

What is a differential backup?

Differential backup.
Copying only added and modified files compared to a full copy.

Differential backup is a type of file backup that does not back up all source files, a only new and modified since the last full copy was made. It is something between a full backup and an incremental one. The name of this type comes from the English word Differential backup and is cumulative, i.e. each successive backup contains all new/modified files since the previous full backup. In Russian, this type of copying is called Difference or differentiated. Like every other, this type also has its advantages and disadvantages.

Pros :

  • Relatively small size of a differential backup compared to a full backup
  • The speed of creating is many times higher than a full backup
  • To restore files, you will need the last full backup created and the last differential backup.

Minuses :

  • Data redundancy, since diff.backup is cumulative

Conclusion: Create a differential backup if the amount of source data is large, the files in the source folder do not change too intensively, and the simplicity and speed of file recovery are critical for you. The creation of differential copies is fast enough, if there are few accumulated changes since the creation of the full one. The optimal frequency of creating a Differential backup is 1 time per hour if the source files are changed frequently and 1-2 times a day if the files are rarely edited.

How to create a differential backup with Exiland Backup

Let's see how to create a differential backup of your PC files using a simple utility. Exiland Backup.

Install Exiland Backup, run the program.

After starting, on the top panel, click on the button for creating a new task, enter the name of the task, for example, "My Documents" and click "Next". On the next screen of the wizard, select the "Differential" copy type.


Job Creation Wizard. Selection of the type "Differential".

After selecting the type at the bottom of the window, you can limit the number of full copies(default 10) - then when this limit is reached, the oldest full backup will be automatically deleted, after which a new one will be created (this setting is not available in Free versions). In addition, you can limit the number of differential copies between full (default 8). When the specified limit is reached, the next full copy will be created.

In the subsequent steps of the wizard, specify the source folder that you want to duplicate and where to save it. You can not set the task launch schedule yet.

When specifying a naming pattern for backups, you can add a string, such as " (differential)", for differential ones, so that you can visually easily distinguish them from full ones.

After creating the task, run it manually by clicking on the "Run" button at the top of the panel.

The first time you run the job, a full copy will be created. Copy Windows Explorer any file to the original folder and run the task again. A delta will be created containing only the new file.

Mikhail, developer of Exiland Backup

Other types of redundancy:

Backing up data is something that every active computer user who does not want to lose all their information (or part of it) in case of an unexpected failure should regularly perform. Often in various applications, designed to back up information, you can find three mechanisms for how to create a copy: completely, incrementally or differentially. In the framework of this article, we will consider how these copying methods differ from each other.

Table of contents:

Data backup methods

There are many programs that are designed to create a backup copy of information, both in the Windows operating system and in Mac OS. All of them perform approximately the same actions - create a backup operating system, completely copy the disk, some of its partitions, folders or other data, depending on the settings selected by the user. After that, these backups can be used to restore information.

The created backup copy needs constant updating. Based on the backup creation conditions applied in the program, you can create a copy, while choosing a backup mechanism:

  • Creation of a complete copy;
  • Generation of an incremental copy;
  • Create a differential copy.

These actions are available in many applications, for example, in one of the most popular programs for data backup, AOMEI Backupper. Within the framework of this article, examples will be considered on it, but you can find similar backup mechanisms in other programs.

Full backup

With this backup method, system snapshots that are generated within the same backup task can work independently of each other. Damage to one of these snapshots will not affect the operation of others. That is, with a full backup, a snapshot of the system contains all the backed up information.

The full backup method is the most reliable, but also the most wasteful in terms of resources. To back up the operating Windows systems and a few small applications, tens of gigabytes are required. Accordingly, constantly saving such full-fledged backups and storing them on the hard drive is irrational and wasteful in terms of free space on the drive. That is why the other two mechanisms discussed below are used.

Incremental backup

Incremental data backup implies that when creating a backup, the user once generates a full copy of the system and all files, and all copies created in the future are children of the main and previous ones, that is, they contain only information about the changes that have occurred - deleted, modified and created files.

Thus, each subsequent incremental copy after the first contains only information about changes. It looks something like this:

  • Second copy. Child - contains information about data changes since the creation of the first copy;
  • Third copy. Child to the second - contains information about data changes since the creation of the second copy.

The advantage of this method of backup data storage, in comparison with the first, smaller size copies (each new incremental copy weighs tens or hundreds of megabytes, depending on the number of changes that have occurred). Minus - the appeal of each new copy to the previous one during recovery. That is, if one of the copies is damaged, you will have to restore to the last one. working copy in an unbroken chain from the first. In addition, restoring from an incremental backup takes longer than from other backup methods.

Differential backup

The differential method of copying is close to the incremental one in meaning, but between them there is key difference. Within differential copying, new snapshots are children of the first one.

This means that during the first backup using the differential method, a complete copy of the system is created, after which all subsequent snapshots contain information about the changes that have occurred from the first copy. It looks something like this:

  • First copy. Main - contains all the information;
  • Second copy. Child - contains information about data changes since the creation of the first copy;
  • Third copy. Child - contains information about data changes since the creation of the first copy.

As you can see, the third copy differential method backup is not a child of the second one. That is, if there are problems with one of the differential snapshots, it will be possible to restore to any other working differential copy. This is the key difference between differential and incremental backups.

Each differential snapshot is larger than the incremental snapshot because it needs to store information about all changes since the first full backup was taken. In this case, each new differential image will weigh more than the previous one.

Which backup method is best

After considering three backup methods, each user can independently decide which option is best for him. Let's briefly summarize and give a few scenarios:

  • Full backup. Most reliable way. Suitable for those users who have the ability to store large backups;
  • incremental backup. The best option for users who backup to a small disk, such as an SSD. The advantage of this method, compared to differential backup, is only in the size of each new system snapshot;
  • Differential backup. The best option for home computer users. With this method of copying, you only need to take care of the safety of the first copy.
A computer