19.06.2024
Home / Instructions / Differential backup. Full, incremental and differential backups Full incremental differential backup

Differential backup. Full, incremental and differential backups Full incremental differential backup

Many people know various systems creating disk images and backing up data, such as Acronis True Image, Pagaron Drive Backup, Ghost, Time Machine for Mac-compatible computers, etc. Microsoft has also implemented a data backup system in its operating systems, which is available for both ordinary users and system administrators. Before the release of the Windows Vista operating system, Microsoft offered users the NTBackup backup system and the System Restore utility, which had a lot of shortcomings. With the release of Windows Vista and the transition to the VHD image storage format, it became possible to more easily back up data and create operating system images using a new set of utilities called Windows Backup and Restore. After the release of new operating systems, this component was improved and modified. In this article, we will look at what Microsoft offers to the end user for backing up data in the recently released Windows 8 operating system. But first, we will briefly talk about the main types of backup that are implemented in numerous products from various companies.

Types of backup

Backup is divided into various types depending on the tasks that are set for those implementing it software. In some cases, users only need to create copies of important files stored on the disk; in others, they need to create full-fledged images of the operating system with the ability to roll back all previous changes. At the same time, system administrators are provided with the ability to centrally store backup copies of data, making it easier to control backup versions and restore systems as needed. Naturally, depending on the selected type of backup, one or another algorithm for comparing and saving files is used - either byte-by-byte or sector-by-sector copying from the data source, when the information is exactly written to the backup media. To restore files and data, the functions of file systems that support journaling and logging of changes can also be used - first, a complete snapshot of the file system is taken, and data is saved to a backup copy as needed if individual files are marked as changed. File systems with advanced version control support are best suited for this case, since they significantly save space on backup media. In addition to the traditional creation of backup copies of files that are not used in this moment, there are real-time reservation algorithms. In this case, backup occurs even when the file is open in any program. This possibility is achieved through the use of snapshots of file systems and is actively used, for example, in virtualization systems for working with virtual disk drives. The data backup process can occur in several ways. Let's look at the most common of them.

Cloning partitions and creating images

Cloning involves copying a disk partition or partitions with all files and directories, as well as file systems, to backup media, that is, creating a complete copy of the data on another media. This requires a large amount of space on the backup media, but at the same time allows for the most complete backup of an individual PC or data drive. Also, special mention should be made of cloning the system in the form of a special image - a virtual drive, that is, a separate file that can contain several disk partitions. Such an image can be created using the operating system itself. It allows you to reduce the amount of data, and also provides the opportunity to subsequently work with it as if it were regular disk, or connect it to virtual machines, which simplifies the transfer of operating systems from one server or computer to another. Today, virtual images are gaining popularity due to the flexibility of connection, as well as cross-platform and easy transfer from one computer to another. As a rule, cloning or creating an image for backup occurs quite rarely, since the volume occupied by the backup is very large. Such procedures are used in most cases specifically to create a copy of the operating system with all the files, and not to back up individual data on disk. To back up user data that changes frequently or is used in work, another type of backup is widely used - full file backup.

Full file backup

This type of backup involves creating duplicates of all files on the media using a simple method - copying from one place to another. Due to the length of the process, a full file backup is usually carried out during non-working hours, due to the large volumes of data. This type of reservation allows you to save important information, but due to the long backup periods, it is not very suitable for restoring rapidly changing data. It is recommended to carry out a full file copy at least once a week, and even better, alternate it with other types of file copying: differential and incremental.

Differential redundancy

Differential backup involves copying only those files that have changed since the last full backup. This allows you to reduce the amount of data on backup media and, if necessary, speed up the data recovery process. Because differential backups are typically performed much more frequently than full backups, they are very effective because they allow you to restore data that has recently been modified and track the history of file changes since the full backup.

Incremental backup

Incremental backup is somewhat different from differential backup. This means that the first time you run it, it backs up only those files that have changed since the last time you ran a full or differential backup. Subsequent incremental backup processes only add files that have changed since the previous backup process. In this case, changed or new files do not replace old ones, but are added to the media independently. Of course, in this case, the file change history increases with each backup step, and the data recovery process for this type of backup takes much longer, since it is necessary to restore the entire file change history, step by step. However, with differential backup, the restore process is simpler: the primary copy is restored and the latest data from the differential backup is added to it.

Many backup software packages use different types of backups, and often combine them to be more efficient and save space. System Windows utilities, which we will talk about in this article, also use various types of backup, which allows you to more dynamically and quickly restore user data depending on the situation. For server operating systems Windows systems There are more recovery utilities available than for desktop Windows operating systems, but here we will consider only those that are available to ordinary users. Moreover, for different editions of Windows OS the set of components differs, which is due to the division of operating systems into corporate and home. For Windows operating systems, there are two main data backup utilities, which differ in the type of backup.

Windows Backup And Restore

Windows component Backup And Restore has become available to users since the release of the Windows Vista operating system and is responsible for creating a complete backup of the operating system with the possibility of incremental backup. With the release of the Windows 8 operating system, this component changed its name to Windows 7 File Recovery. Although it has not lost any of its functionality, Microsoft recommends using the new File History utility for backing up data, which is included in the Windows 8 and Server 2012 operating systems, but we will talk about it a little later. Windows Backup And Restore allows you to create an automatic full backup to removable media, optical discs or to a special location on a remote server.

The latter option is only available for certain Windows editions 7/8, as it is positioned as a solution for IT administrators of companies. A full system backup when using this component involves not only saving user files, but also the ability to create an image of the entire operating system and backup individual computer disks. It is also possible for the user to create an exclusively system image, which can subsequently not only be extracted to a new media of this computer, but also used as virtual disk in virtualization systems. When using this component, the user can specify the folders that need to be backed up, as well as indicate those system drives that need to be saved during a full backup. When backing up files only Windows user Backup And Restore uses incremental data backup, which allows you to get a larger number of file snapshots at different points in time. Typically, a full backup is performed once a week and involves not only backing up the user's files, but also creating a system image, as well as copying data for Windows System Recovery recovery points. The process of restoring user files can occur directly from the operating system - it is quite simple and understandable for most users. System recovery in the event of a serious failure can be carried out using the built-in Windows Recovery utilities. To do this, you must either create a new special recovery disk, or use the installation image of the operating system from which it was previously installed on the PC. When loading in mode Windows recovery Recovery will offer the user a choice of the following recovery modes: restoring files, moving to a specific recovery point, extracting a backup system image to the main system drive. Data for recovery in this case can be taken from optical media, external or internal storage, and also with network storage data. The operating system edition does not play a role in this case. Alas, despite the fact that Windows Backup And Restore is a fairly powerful and convenient component of the operating system, Microsoft stated that, according to research, this utility is used by, at best, 5% of users. In this regard, to make data backup simpler and more efficient, Microsoft has developed the next generation of system backup for users - Windows File History.

Windows File History

Windows File History, a new component of the Windows 8 and Server 2012 operating systems, in some ways replaces its predecessor, Windows Backup And Restore. It is intended to replace only incremental file backup, while system imaging and full backup mode can be performed exclusively with using Windows 7 File Recovery. Windows File History was originally designed as a convenient and practical solution for users who want a transparent way to back up their important data. When developing this utility, special attention was paid to the ease of initializing the process combined with the ability to conveniently and quickly view all saved data. The backup process using the new utility occurs unnoticed by the user in automatic mode and does not require additional actions from him. It should be noted that the modification of backup to network devices allows you to easily and conveniently work with saved files if you use mobile connections or weak communication channels.

The Windows File History utility was based on part of the basic functionality of Windows Backup And Restore, in which the visual component responsible for presenting saved user data was redone. Viewing previously saved data is now available from the Windows Explorer file manager using a separate History tab. This allows you to quickly find the necessary files and restore them to any location on the system. Despite the fact that the backup process is based on an incremental backup, when working with it there is no thought that this is a backup, but rather a history of the creation, modification or deletion of user files, available at any time. This approach to data backup will certainly suit most inexperienced users, since the process is convenient and more intuitive to use than working with Windows Backup And Restore.

To back up data using Windows File History, you can use optical media, external drives, or network storage. Of course, data storage on optical media- this is more of a tribute to tradition than a real method of using incremental backup, because data can change very often. The best choice for ordinary users is backup to an external or internal drive.

For ease of use in Windows 8, each external drive you connect can be used as a backup tool using Windows File History. So, if the drive is connected, the options in the autorun drop-down menu now have a separate tab that allows you to designate the connected drive as a backup drive in one click. Moreover, even if the disk was subsequently disconnected from the system, data backup will resume as soon as it is installed back. A similar approach is applied in the case of backing up data to network storage. Disconnect from local network will not affect the operation of the system in any way, and when a network environment appears operating system will automatically start a new reservation cycle according to the schedule. Transparent activation system Windows functions File History is truly a huge plus for the user.

By default, backups using the Windows File History utility occur every hour, but if necessary, the user can choose the time intervals between each data backup. The user has the opportunity to set intervals between reservations from 10 minutes to 1 day. Windows File History can only set one current backup location, but if you add multiple drives to backup locations, they can be used interchangeably depending on their availability. This is convenient when using network storage and a separate drive. Thus, the data will be saved in several places depending on current configuration. Also worth noting is the function of selecting the number of depths of saved copies. For example, after one or several months, the system can automatically overwrite old data, replacing it with new ones. This allows you to save space in the place where data is backed up. In addition, the user can use up to 25% of the storage space for data backup.

The Windows File History utility by default backs up the most actively used folders, namely Contacts, Favorites, and Desktop. In addition, the reservation is automatically applied to all Libraries folders in use. The user can create their own data libraries, which are essentially symbolic links to real folders on the computer. That is, if a user needs to reserve a specific folder on a PC, he has to Windows installation File History you need to add this folder to your libraries. In addition, if some folders need to be excluded from the backup, the user can selectively exclude all user libraries or a set of frequently used folders. Taking into account the active integration with the Windows Skydrive cloud storage function, the use of this cloud service can be aimed at backing up important user data stored in the cloud. In order for such a combination to work, you only need to install Skydrive - after that it will automatically be added to the libraries and will be backed up as needed. Alas, the function of backing up data to the “cloud” is not yet available to users, but Microsoft is already planning to add a certain ability to back up data to “cloud” data storage in future versions of its OS.

Thus, new system Windows backups File History is great for most users. A simple and intuitive interface with the ability to quickly add and restore files is much closer to the modern user than previous version incremental backup in Windows Backup And Restore.

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

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

Note that if you enable the block change tracking option, RMAN can access 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 implement or use incremental backups, but only offers improved performance.

Incremental Level 0 and Level 1 Backups

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 a 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 the incremental strategy.

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

  • Differential backup, which backs up all blocks changed since the last incremental backup at level 1 or 0
  • Cumulative backup, which 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 modified 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 level 0 backup is not available, then the behavior depends on the compatibility mode setting. If compatibility >=10.0.0, RMAN copies all blocks changed since the file was created and stores the results as a level 1 backup. In other words, during an incremental backup, an SCN equal to the SCN of the file creation is taken. If compatibility<10.0.0, RMAN генерирует бэкап уровня 0 содержимого файла во время резервного копирования, чтобы не было противоречия с предыдущими релизами.

Figure 1 Differential Incremental Backups (default)

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

Cumulative Incremental Backups

In a level 1 cumulative backup, RMAN backs up all blocks that have been used since the last level 0 incremental backup. Cumulative incremental backups reduce the work required for recovery, 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 cumulative level 1 backup of the database:

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

Figure 2 Cumulative Incremental Backups

In the example shown in , the following happens:

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

Simple Incremental Backup Strategy

Select a backup scheme according to an acceptable MTTR (short for mean time to recover). For example, you can implement a three-level 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. With this design, you will never have to use more than one day's worth of transaction logs to achieve 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 your database's rate of change is predictable, you can monitor the size of the 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 data file 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 the base level 0 backup. For example, if you create only cumulative level 1 backups, then after taking another new level 1 backup with a size approximately half the size of the base level 0 backup, take a new level 0 backup 0.

Thank you for your attention!.

    A full backup contains all used data file blocks.

    An incremental backup of level 0 is equivalent to a full backup that was marked as level 0.

    The cumulative incremental backup of level 1 contains only blocks modified since the last incremental backup of level 0.

    A level 1 differential incremental backup contains only blocks changed since the last incremental backup.

Full Backups

A full backup is different from a full database backup. A full data file backup is a backup that includes every usable block of data in the file. RMAN copies all blocks to a backup set or image copy, skipping only those data file blocks that have never been used. For a complete image copy, all file contents are reproduced exactly. A full backup cannot be part of an incremental backup strategy; it cannot be a parent for subsequent incremental backups.

Incremental Backups

An incremental backup is either a level 0 backup, which includes every block in the data file except blocks that were never used, or a level 1 backup, which includes only those blocks that have changed since the previous backup was taken. A level 0 incremental backup is physically identical to a full backup. The only difference is that a level 0 backup (as well as an image copy) can be used as the basis for a level 1 backup, but a full backup can never be used as the basis for a level 1 backup.

Incremental backups are defined using the INCREMENTAL keyword of the BACKUP command. You specify INCREMENTAL LEVEL .

RMAN can create multi-level incremental backups as follows: types of RMAN backups:

    Differential: The default incremental backup type that backs up all blocks modified since the most recent incremental backup at either level 1 or level 0

    Aggregate (Cumulative): Backs up all blocks modified since the most recent backup at level 0

Examples

    To perform an incremental backup at level 0, use the following command:

  • To perform a cumulative incremental backup, use the following command:

    RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

RMAN makes full backups by default if neither FULL nor INCREMENTAL is specified. Compressing unused blocks causes blocks that have never been written to to be skipped when backing up to backup sets - even for full backups.

A full backup has no effect on subsequent incremental backups and is not considered part of any incremental backup strategy, although a full backup in the form of image copies can be incrementally updated using incremental backups with the RECOVER command. This will be described in a later article.”

Please note: You can perform any type of backup (full or incremental) of a database that is in NOARCHIVELOG mode - unless, of course, the database is open. Note also that recovery is limited to the time of the last backup. The database can only be restored to the last committed transaction when the database is in ARCHIVELOG mode.

Incremental backup allows you to effectively save information that is constantly changing: documents, projects in development, mail backup, etc. Handy Backup - incremental backup program any files.

What is incremental backup?

Incremental copy is a copying method in which additions are added step by step to the original copy of a data set, reflecting changes in the data (these step-by-step changes in the data set are called increments).

For example, if out of 200 files in the original set only 3 are changed, then they will be copied during the next incremental backup.

The incremental backup program must provide the ability to regularly make such additions, as well as their step-by-step recovery if necessary.

In this mode, incremental copying is repeated cyclically, starting with a full data backup. When the number of incremental backups reaches the specified value or statute of limitations, the entire cycle is repeated automatically, starting with the creation of a new full copy.

The key advantage of a mixed incremental backup is its ability to break off too long chains of increments. This can slightly slow down the backup process, but makes data recovery more reliable and faster.

How to perform incremental backup of files in Handy Backup?

It is very easy to program an incremental backup task in Handy Backup. Select in Step 4 in advanced mode* to create a task incremental or mixed incremental copying.

For mixed incremental copying also set the length or repetition time of the chain of incremental backups in the version settings dialog.

* At Step 1 of creating a task, you must check the box next to "Advanced mode".

Recommended solution for incremental backups

Cross-platform solution for incremental backup

Incremental copying of files and folders in Linux and over the network

In addition to the Windows version, Handy Backup also fully supports Linux distributions based on Ubuntu 16.04 and 14.04 at the executable program level. The program also provides a Java workstation for network Windows, Linux and FreeBSD machines.

Try Handy Backup's capabilities for incremental file backup yourself,
by downloading and installing a free 30-day trial version of the program with all the features!

An incremental backup copies only those files that have changed since the last time a full or incremental backup was performed. Subsequent incremental backups only add files that have changed since the previous one. On average, incremental backups take less time because fewer files are copied. However, the data recovery process takes longer because the data from the last full backup must be restored, plus the data from all subsequent incremental backups. In this case, unlike differential copying, changed or new files do not replace old ones, but are added to the media independently.

Cloning

Cloning allows you to copy an entire partition or media (device) with all files and directories to another partition or to another media. If the partition is bootable, then the cloned partition will also be bootable.

Image backup

An image is an exact copy of an entire partition or media (device) stored in one file.

Real-time backup

Real-time backup allows you to create copies of files, directories and volumes without interrupting your work, without restarting your computer.

Rotation schemes.

Changing the working set of media during the copying process is called media rotation. For backup it is very important issue is the choice of a suitable media rotation scheme (for example, magnetic tapes).

One-time copying is the simplest scheme that does not involve media rotation. All operations are carried out manually. Before copying, the administrator sets the backup start time, lists file systems or directories that need to be copied. This information can be stored in a database so that it can be used again. For one-time copying, full copying is most often used.

Simple rotation Simple rotation implies that a certain set of tapes is used cyclically. For example, a rotation cycle may be a week, in which case a separate media is allocated for a specific working day of the week. The disadvantage of this scheme is that it is not very suitable for maintaining an archive, since the number of media in the archive is rapidly increasing. In addition, incremental/differential recording is carried out on the same media, which leads to significant wear and tear and, as a result, increases the likelihood of failure.

“Grandfather, father, son” This scheme has a hierarchical structure and involves the use of a set of three sets of media. Once a week a complete copy of the computer disks is made ( "father"), incremental (or differential) copying is carried out daily ( "son"). Additionally, once a month another full copying is carried out ( "grandfather"). The composition of the daily and weekly set is constant. Thus, compared to simple rotation, the archive contains only monthly copies plus the latest weekly and daily copies. The disadvantage of this scheme is that only the data available at the end of the month, as well as wear and tear of the media, are included in the archive.

The Tower of Hanoi scheme is designed to address some of the shortcomings of the Simple Rotation and Grandfather, Father, Son rotation schemes. The scheme is based on the use of several sets of media. Each set is designed for weekly copying, as in a simple rotation scheme, but without removing full copies. In other words, a separate set includes media with a full weekly copy and media with daily incremental (differential) copies. The specific problem of the Tower of Hanoi scheme is its higher complexity than other schemes.

“10 sets” This scheme is designed for ten sets of media. The period of forty weeks is divided into ten cycles. During the cycle, each set is assigned one day of the week. After a four-week cycle, the set number is shifted by one day. In other words, if in the first cycle dial number 1 was responsible for Monday, and number 2 for Tuesday, then in the second cycle dial number 2 is responsible for Monday, and number 3 for Tuesday. This scheme allows you to evenly distribute the load, and therefore wear between all media.

The Tower of Hanoi and 10 Set schemes are not used often because many backup systems do not support them.

Backup storage

1. Streamer tape - recording backup data on the tape drive;

2. "Cloud" backup - recording backup data using cloud technology through online services of special providers;

3. DVD or CD - recording backup data onto compact discs;

4. HDD - recording backup data on HDD computer;

5. LAN - recording backup data to any machine within the local network;

6. FTP - recording backup data to FTP servers;

7. USB - recording backup data to any USB-compatible device (such as a flash card or external hard drive);

8. ZIP, JAZ, MO - backup to ZIP, JAZ, MO floppy disks.