How to set up smartphones and PCs. Informational portal

Data archiving systems windows server. Simple backup server

Good afternoon, dear readers of the blog, I have already shown you many times how the operating room is being repaired and restored. Windows system, but almost all these articles were about client versions, today I want to correct myself and finally cover the question of how windows is backed up server systems, since the exit from the standing server is fraught with financial losses for the business, in contrast to the downtime of the usual office computer. I will tell you my examples from life, in which archiving windows server 2012 r2 would be very helpful to me.

Backup windows server 2012 r2

As you may have guessed, backup of windows server systems is carried out using the built-in component of the archiving system windows data server 2012 r2. I want to note right away that it is also available in 2008 R2, but I will use the example of a more modern version, although everything stated will work for the previous version. If you have seen the times of Windows Server 2003, then you are probably familiar with the NTBackup component, it was they who did everything system backup and she even knew how to write on tapes. Then it replaced 2008, without R2, and showed a poor and redesigned windows archiving component, from which a bunch of functionality was removed, I still don’t understand the logic of the people who then released this component in this form. A year has passed and R2 came out, which already brought back most of the features that were in NTBackup and made backing up windows server very simple and convenient.

If anyone is not in the know, then unlike client versions of Windows, server versions do not have a system protection mechanism by default, and if the bootloader or some other system files are damaged, it will not be possible to quickly recover from the previous version, but it's all about the architecture of the server OS , since it defaults to the minimum, for greater protection and reduced load. The system administrator will decide for himself what he needs and this is right, but protection could have been turned on.

I’ll tell you an example from life, like all administrators, most of the server park has long been virtual machines, although there is a small part of the servers that are not virtualized, simply because it’s not rational and will not give an exhaust, I’m talking about servers with 300 GB of RAM and MS SQL server. One fine day there was a power failure and the UPS could not stand everything. As a result, the servers turned off, not quite right. While restoring services, one of the servers failed to boot and had an error occurred while attempting while Windows boot. She managed to win, but after 5-6 hours, which you will agree is not very fast, but if there was a backup copy of the system and a recovery tool, then everything would have passed in a couple of minutes.

If possible, always backup the OS from physical servers, then save a lot of time and effort

If you go to System Properties, you won't find the System Protection tab on Windows Server 2012 R2.

Why Windows Server 2012 R2 Backup

I understand perfectly well that there are a number of other software products for backing up server OSes, for example from:

  • Veeam
  • Acronis

But the windows server 2012 r2 data archiving system is already under the hood in the system itself, and the biggest shock is that most system administrators simply do not know about it, so they are forced to use third-party products. Someone told me that he does not understand how it all works, which prompted me to write this article so that people can see it all in practice.

Where can I backup

The windows server data archiving system can back up to the following storages:

  • Ideally, the system should be separate disk, which marks the backup system and hides from the user, for further creation of recovery points. Microsoft itself recommends this option. By the way, if someone is familiar with Microsoft System Center Data Protection Manager, then the backup system worked there.
  • You can use pre-allocated partitions
  • Network folders
  • iSCSI disks

The windows server 2012 R2 data backup system can create full copy and differential (additional), she manages the shelf life. It has a very simple principle of operation, it will record and store as many copies as disk space allows, then it will be cyclically overwritten, newer to older, very similar to video surveillance.

So after setting up the backup storage, the Windows Server Backup service will do everything and organize the data storage space. This is a huge plus for novice system administrators, since not everyone is immediately able to estimate the required amount of storage and the amount of data, many do not know that data in backups is compressed, and if you also know such a word as Windows deduplication, then you can squeeze out disk space maximum.

Let's talk a little about the mechanism of the windows server archiving system itself, there is nothing new here, it uses the volume shadow copy service (VSS), its task is to let the archiving tool work with open and system files, and not just work, but also not interfere system to work, the service simply makes a certain snapshot of the state, it is very similar to that of virtual machines. On the Windows Server 2012 R2 engine, you can back up virtual machines to Hyper-V 3.0 this way without stopping them.

VSS capabilities also apply to databases, I can say with one hundred percent certainty that you will not have problems with Exchange or MS SQL, but PostgreSQL can create certain difficulties. If we are talking about MS SQL, then it perfectly understands the VSS service and transfers the database to a consistent state before the shadow copy is created, VSS itself does not even think about checking the logical integrity of the data, it does not need it, since its task is to take a snapshot. If, for example, PostgreSQL is backed up in this way, then when restoring, we will get a slice of the database for a certain state of time in an inconsistent state and it will not contain all pending transactions at the time the backup was created. So, there is some such proprietary to their products.

Where is the best place to copy

It is not easy to answer this question, since everyone has different backup situations and infrastructure. Let's look at the pros and cons of different storages. I remember we have several of them. Firstly, if you put a backup copy locally on the server, then you will make it faster and be able to recover faster if necessary, and on the other hand, the server may break locally, and even worse if it is RAID, then everything will be sad. The second example is you make a backup on iSCSI disks, it's good that it is stored remotely from the server, you can quickly reconnect to another server if necessary, but slower speed backup and restore speed, and servers and disks from which you make iSCSI disks can also fail. Summing up, ideally you should have copies in several places, it is clear that this is not always possible, but you need to strive for this, here you need to understand the criticality of the data and implement the system based on this.

Installing the windows server backup system

Let's watch how the windows server 2012 r2 data archiving system is installed, since 2008 it has been a system component and it is logical that you need to look for it in the server manager. Select Manage > Add Roles and Features

leave the item install roles and components

Select Windows Server Backup

and click install.

After a couple of moments, you will have the desired component installed.

Configuring the windows server archiving system

After installing the archiving component, you need to configure it, let's get started. Open Server Manager > Tools and find Windows Server Backup.

You can also call this snap-in by pressing WIN + R and entering wbadmin.msc, see the full link. When you open the snap-in, you will immediately see that you are strongly advised to set up the first schedule. You can do this through the action menu:

  1. Backup Schedule
  2. One time backup
  3. Recovery

I click the backup schedule, you will see the setup wizard window, in the first step you will have the choice to backup the entire server or a custom backup. I always advise doing the Custom option, as you will explicitly specify what needs to be backed up and what not.

in the Backup Objects window, Windows Server Backup will ask you to add items using the corresponding button.

Among the elements you will have:

  • Recovery initial state systems
  • State of the system
  • Local drives
  • The Hyper-V role, if installed.

As a result, objects for archiving will be added to the list, I want to note that if you click the button Extra options, then you can set the VSS parameters:

  • A full VSS backup is fine if you don't use third party backup applications.
  • Copy VSS archive > if another program is used to back up applications on the volumes included in the archive.

For example, if you are using Exchange or MS SQL, then select copy VSS archive for normal interaction with the shadow copy service.

Also on the exclusions tab, you can add folders that do not need to be copied, for example, they may contain temporary files, it is convenient when you have added a full copy of the C: drive before.

Now, in order to back up the windows server, you need to set a schedule, here either once a day, or more often, we set it at our discretion.

  • Archiving to a hard disk for archives > here the physical HDD is completely given, formatted and hidden from the user, such protection from the fool that playful hands do not spoil everything.
  • Archiving on a volume > the same is very common, you take an existing volume (it can be part of a RAID or another physical disk) and pour it there, an iSCSI disk, which is seen as local in the system, also falls under the same business.
  • Well, the general ball, very convenient, everything is outside the physical server.

If you select Backup to hard disk for archives, then in the next step you will be asked to specify the disk that will be given for windows server backup.

From my point of view, you should have a local backup of the system and a backup on iSCSI disks that are not tied to a physical server

If you choose to archive to a shared network folder, you will see a warning window that if you specify a remote shared folder as the destination for scheduled backup, only the latest archive will be available if plain language, then it will just be a permanent overwrite, convenient for a quick backup to be on a remote storage.

If you select Backup to volume, then you need to specify the destination volume to which the windows server will be backed up.

We look at the summary information and confirm the schedule.

We see that the windows server archiving system successfully created the schedule.

Restoring Windows Server 2012 R2

After you have a backup, let's look at the situation in which you will need to perform the procedure Windows recovery Server 2012 R2. First, you can see Windows Server backup details (size, date)

How to restore a single file or folder

If you need to restore, for example, a separate file, then there is no point in restoring it through a snap-in, since the backup is a virtual disk that can be hooked to the system. Let's see the very structure of the files, they are in the WindowsImageBackup folder.

Here is an example of my virtual disk, by right clicking on it you can click Connect.

You will be warned that the disk image is not initialized, contains unrecognized partitions, or volumes that do not have drive letters assigned. Use the Disk Management snap-in to verify that disks, partitions, and volumes are usable.

Here we just go to the Disk Management snap-in, through the right mouse click on the start button.

We see our mounted drive, right-click on it and select change drive letter or drive path.

We assign the desired letter, for me it is the letter E.

We all open my computer and see a new local disk.

When you're done working with the disk, through the disk management snap-in, mount it. As you can see, virtual disks are a very useful thing.

Recovery in the event of an operating system failure

No one is immune from this, I have seen many times in my practice that the Windows Server system failed, and to restore it without a backup, it took much more time than just reinstalling the system and further reconfiguring, an example would be an error occurred while attempting to read the boot configuration data. Therefore, a couple of times when you get burned, you will understand that the windows server 2012 r2 data archiving system is a smart thing that allows you to backup windows server in a matter of minutes and in right moment recover from it.

We go into the windows server archiving system and select the Restore item in the right corner. You will have two options to choose from:

  1. This server > means that the backup is local
  2. The archive is in a different location.

First, let's select the second item "The archive is in a different location"

There are two options here, either you slip a cd-rom or an external drive, or you specify a UNC path in the format \\folder

The main thing is that the system has the rights to read it.

If you select This server at the beginning, then you will see a list of available Windows Server backups, you just need to select a rollback date.

  • Files and folders
  • Hyper-V
  • Applications
  • State of the system

By choosing the first option "Files and folders" you can restore individual files or folders from a backup.

If you choose Hyper-V, then you will be offered:

  • Restore to original location > this is essentially an overwrite
  • Restore to another location
  • Copy to folder

The application point is a little specific, as it does not work for all applications, but for those who know how to work with the archive service API and support VSS. Well, system restore:

  • The original location > will be rolled back to the state it was in when Windows Server was backed up
  • Alternate location > essentially creates a folder with a set of files.

Click restore

The number of files to be recovered will be calculated and the process will begin.

After reboot you will see the following message:

System State Restore operation started on 02/08/2017 completed successfully

An alternative to a system state restore is a volume-level restore, which will destroy all data and return the volume to the state it was in on the specified date. This can be useful in the event of a virus incident, when you want to be sure that there are no malware bookmarks left on the system, and also in cases where the original volume has been corrupted. In general, the tool itself is very good and is not inferior to competitors, the same Acronis, so use it and simplify your life.

The archiving system replaced NTBackup with Windows release Server 2008 is still a mature and proven product, but many administrators still do not use this OS component, preferring alternative products. This can be both objective reasons and a misunderstanding of the principles of operation of the Windows Server backup system. Therefore, we decided to eliminate possible gaps in knowledge with the help of this article.

We quite often asked system administrators we know the question: what tools do they use to back up the state of their servers? And they were very surprised that many of them did not even mention the Windows Server Backup system. When asked why they don't use this tool, we often got the answer that they don't understand how this system works, how to manage backups, etc., etc. In part, the reason can be called valid, when there is no understanding of how this or that remedy works, then it is better to refuse to use it.

Better yet, figure out how it works and start putting it into practice. IN new system archiving, many expect to see a successor to the familiar NTBackup, but Microsoft has completely redesigned the backup mechanism and we have a completely different tool. The main backup storage is a disk that is independently marked by the archiving system and hidden from the user. You can also use an already partitioned volume or network resource, but these methods have their limitations and negate all the advantages of the new technology.

The new archiving system independently manages the backup process, creating primary and incremental copies of data, as well as their retention period. This is one of the main difficulties that arises when using a new tool. Many administrators are accustomed to explicitly specifying the type created archive, their number and shelf life, therefore, not finding the necessary options here, they make hasty and wrong conclusions.

With Windows Server Backup, you hand over an entire drive to a service and it handles the storage process as it sees fit. Is it good or bad? In our opinion, it's good. Because quite often there are situations when the administrator incorrectly estimates the size of the disk space required for storing copies or there is a sharp jump in the volume of archived data. In this case, it is very likely that the backup service will fail due to lack of free space at the most inopportune moment.

Windows Server takes a fundamentally different approach. The easiest way to draw an analogy is with video surveillance systems, when a stream is continuously written to disk and at any given time we have a certain recording duration determined by the disk size. Let's say we installed a 500 GB disk - we have a week of video, we replaced it with 1 TB - two weeks, etc.

The backup service works in a similar way, writing copies to disk until space is exhausted, then the oldest copies are overwritten. Thus, you will always have a constant backup depth, limited only by the disk space, even a sharp increase in the data being copied will not lead to negative consequences, only the number of available copies will decrease.

Here another difficulty arises. For many administrators, the word disk is associated only with a physical hard disk, after which a lot of questions immediately arise: where to get so many disks, how to connect them to servers, how to store archives separately from the system, etc. etc. Yes, and allocating even a 500 GB disk for backup of a member server looks somewhat wasteful. Therefore, it's time to think about technology, which allows you to immediately solve the entire layer of "problems".

Indeed, this technology is now supported by all systems, including even NAS with a price category slightly higher than the initial one, which allows you to properly manage the available disk space and organize the storage of archives separately from the systems. Microsoft recommends that you have 1.5 times more disk space for storing two copies of data, in our opinion this figure is somewhat overestimated, especially if you are copying data that rarely changes, for example, server state.

We'll jump ahead a bit and show the result of archiving a test server with 29 GB of archived data:

As you can see, eight copies of the system state took up about 9 GB, which is quite good, and the total amount of 60 GB iSCSI disk we allocated is enough for about three weeks of storing daily copies, which in our opinion is more than enough.

To create backups, the volume shadow copy mechanism (VSS) is used, which allows you to work with open and system files without interrupting the work of the system and users. Starting with Windows Server 2012, the archiving system also allows you to archive virtual machines running on a host. Hyper-V machines and restore their state separately. When using other software on the server that uses shadow copying capabilities, the archiving system has the ability to save the VSS log, which will ensure correct work these services when you restore.

Separately, you should touch on database backup, if with products that support shadow copying, such as MS SQL Server or Exchange, there are no problems, third-party products, such as PostgreSQL, may have problems. The shadow copy mechanism does not check the logical integrity of files, just taking a snapshot of their state at a certain point in time, systems that support VSS can handle this moment, bringing the database to a consistent state before the moment the shadow copy was created. For unsupported systems, we simply get a slice of the database for a certain state of time, when such a database is restored, it will be brought to a consistent state by means of the DBMS, in other words, all incomplete transactions will be canceled and data loss may occur.

Based on the foregoing, we can conclude that the Windows backup system is well suited for creating backups of the system and user data, as well as "native" services and applications. For archiving complex third-party software, it is better to use tools that provided by the manufacturer this software.

In order to start using the Windows Server Backup system, you first need to install the component of the same name, this is done through Add Roles and Features Wizard.

The service management snap-in can then be launched either via Facilities in Server Manager, or through a shortcut in Control Panel - Administration.

The equipment is absolutely typical for Windows services Server and does not cause any difficulties when working with it.

A quick glance at the screen allows you to immediately evaluate current settings and service status available actions centered on the right. There are few of them: One-time backup, scheduled backup and restore. We are primarily interested in the schedule, although a one-time backup is also a rather convenient tool that allows you to quickly make a copy of the server state before any potentially dangerous actions, so that you can roll back to their very beginning.

Pressing Backup Schedule we will launch the wizard of the same name, which offers us to archive the entire server, or specify objects for selective archiving.

We will always have time to archive everything at once, so we will choose a custom archiving type. In the next step, we will be asked to select objects for archiving.

To add them, just click Add items.

If choose Restoring the original state of the system, will automatically be added State of the system, system partition(drive C:) and a service partition with a bootloader. To this data, for educational purposes, we added a folder with MS SQL databases, which should represent some user data.

And also set the parameters of the shadow copy service, if you have applications using this service, for example, MS SQL Server, then you should select the Copy VSS log setting, which will ensure their normal interaction with the shadow copy service, including during recovery.

Then you will need to create a schedule, the task is extremely simple, you can run archiving both once or several times a day, the minimum interval step is half an hour.

We figured out the schedule, now it's time to decide on the place to store the archives. There are three options to choose from, each of them is quite well commented, which makes it easier right choice:

As we have already said, it is optimal to allocate an entire disk for archiving, we recommend using iSCSI disks for this purpose, which allows you to solve two main tasks at once: make the best use of disk space and store archives separately from the system.

Separately, it is worth dwelling on the possibility of placing an archive in a network folder, despite the severe limitations, this method is convenient to use for one-time archiving, when you need to quickly create an archive and place it outside the server.

If you have selected a drive, it will be formatted and hidden, this ensures additional protection from possible destructive influences, for example, ransomware trojans.

On the last step once again make sure that the settings are correct and confirm them by pressing the button Ready.

Now it remains to wait for the specified time and make sure that the archiving process was completed without failures. When creating a schedule, you should take into account the load on the network and disk storage subsystem, which can lead to a decrease in their performance.

After the backup has been created, it will not be superfluous to check the possibility of restoring from it. To do this, select the action of the same name in the snap-in, and this will launch Recovery Wizard, which will first ask you to specify the location of the archive:

Then we specify the date and time the backup was created to which we want to rollback, the available dates are highlighted in bold.

Then we indicate what exactly we want to restore:

As you can see, these can be files and folders, Hyper-V virtual machines, volumes, applications, and system state. Separately, mention should be made of applications. This feature is only available to applications registered with the archive system, which must be able to work with the archive service API and support VSS. Simply put, this list includes a limited number of programs, mainly from Microsoft itself, and for third-party software given function useless.

At the same time, it is difficult to overestimate the possibility of restoring the state of the system, which allows you to roll back the state of the OS without affecting user data. This helps a lot in situations where some time has passed between making changes to the system and revealing their negative effect.

Restoring the system state is performed in two stages, each of which ends with a reboot.

Moreover, the second stage looks like a normal OS boot and does not display any messages, just rebooting after a while. It may seem that an error or failure has occurred, but it is not.

Therefore, you just need to be patient and wait for a message about the successful completion of the operation. Depending on network speed, disk performance, and data volume, this operation may take a significant amount of time.

An alternative to a system state restore is a volume-level restore, which will destroy all data and return the volume to the state it was in on the specified date. This can be useful in the event of a virus incident, when you want to be sure that there are no malware bookmarks left on the system, and also in cases where the original volume has been corrupted.

Overall, this operation is no different from restoring a volume from an image with any other software, such as Acronis.

When restoring folders and files, you can flexibly manage the recovery options, for example, by saving both versions of the file: the current and the recoverable one, this is useful in cases where the file was accidentally overwritten, but the result of the current work is also needed. When restoring, you can also restore all access rights to files and folders, which is important if you use a complex system for assigning rights.

As you can see, the Windows Server backup system is a very functional and convenient tool that allows you to successfully restore data at any level and at the same time removes a significant part of the administrator's worries about managing this process. So if you are not already using this system archiving, then after reading this material It's time to take a closer look at her.

  • Tags:

Please enable JavaScript to view the

Data protection has always been critical for Windows professionals. This is usually accomplished by running a regular backup job that writes data to tape or disk. Large IT departments with significant budgets can afford to purchase full-featured third-party products. The rest have to be content with the free backup tools provided by Microsoft.

Microsoft's free tool was called NTBackup, but that's gone. Windows Server 2008 has a new set of backup tools, and I'll tell you how easy they are to use. Even if you have third-party backup tools, it's always good to know how to quickly and without extra effort make a backup copy by regular means. Keep in mind that the new utility does not work with backups created by NTBackup.

Briefly about the archiving utility

First you need to install the backup utility because it is not installed by default. In Server Manager, open the Add Features Wizard and add the Windows Server Backup Features feature ( rice. one). We need a subcomponent to allow command line commands, which allows us to use Windows PowerShell. You can also use the command line tools to install this subfeature as follows: C:\ servermanagercmd –install backup-features.

Rice. 1 Use the Add Features Wizard to install Windows Server Backup and command line tools.

Next, specify the location where the backups will be stored. Files can be stored on a shared network volume, on a local volume, or on a dedicated drive. You can't copy data to tape, but with the widespread availability of inexpensive USB plug-in devices, this no longer looks like a serious disadvantage. However, there are a number of circumstances that must be taken into account.

Reserve Windows copy creates a significant overhead due to the need to create additional indexes, directories and other auxiliary files. It is no longer a simple creation of a ZIP file. You should not expect that a backup copy of a file with a total volume of 100 KB will take up the same amount of disk space - its size will be much larger.

When copying to a network folder, you must carefully consider the level of file access to ensure the integrity and protection of backups. You also need to keep in mind that when copying to a shared network folder, the previous backup is overwritten. The simplest solution is to create a subfolder for each backup. The same story with placing backups on a local volume.

One of the advantages of using a network share or volume is that Windows Backup will create a .vhd file containing all of the files being copied. When determining where to store backups, Windows Backup will create a folder top level named WindowsImageBackup. Within this folder, subfolders are created for each computer. Backup versions differ in time; Here is an example folder name: "Backup 2009-12-14 172606". This folder stores archives and a VHD file. This VHD file can be mounted on Windows 7 or Windows Server 2008 R2. Depending on the type of backup and archiving requirements, this file can be moved to a long-term storage disk or DVD.

The simplest and fast option- Dedicated mapped drive. It can be internal or external with USB or FireWire interface. Microsoft recommends that you have 2.5 times more free disk space than you need to create an archive of all the data being backed up. The drive should be formatted and hidden from the normal management tools - it should only be available in the Disk Management panel. Drives up to 2TB are supported.

Create a backup task

The Windows Backup utility is designed as a versatile server protection tool. You can create a regular backup job for files and system state, or provide the ability to restore an entire server from scratch. Microsoft suggests that one job is created for this purpose. I'm assuming that you are using the capabilities of the Windows Backup utility due to limited budget and want to get the most out of it possible protection under existing restrictions.

After installing the Windows Backup utility, in Server Manager, expand the Storage node and select Windows Server Backup. In the Action panel, select "Backup Schedule" to open the Backup Schedule Wizard. On the first page of the wizard, click Next.

On the second page of the wizard, define the archive type. Select a full server backup. You can choose a custom backup and choose the items to archive, for example certain files and the state of the system. How to make a quick backup of files, I'll show a little later, but for now let's make a complete copy of the server.

The third page sets the time for the task to complete. In most cases, one backup is enough, but you can run it more than once a day, such as backing up critical files.

On the fourth page, decide where to store the backups. Microsoft recommends using a dedicated hard drive. Keep in mind that the drive will be reformatted and not available for any other operations. You can also use a local or network volume. Carefully read the warnings and information about restrictions - you will probably see a warning that the selected drive will be reformatted.

If all drives are not visible, click the All available disks» (Show All Available Disks) to refresh the list. The utility will issue a warning if you select new disk. Having specified the disk, they proceed to checking the archiving parameters. If something is wrong, use the Previous button to go back and fix the error. If everything is correct, a summary window should open. The next day, check the results of the job in the Windows Backup Utility node for any error messages.

You can also use the Windows Backup utility to create a one-time backup. Select the Backup Once option in the Actions panel. You can use the same options as the existing job, or set completely different ones. If you select the second option, the wizard will restart, allowing you to enter new parameters. For example, copy files to a network volume. Be aware that any existing backups in the same folder will be overwritten. The backup starts immediately. If this is a standalone backup job that needs to be run frequently, we recommend that you create a command line script or Windows PowerShell. I will talk about this procedure later.

Data recovery

Windows Backup uses timestamps to track versions. Selecting the Recover command launches a wizard whose instructions are almost self-explanatory. Choose a backup. The Restore Wizard will provide a list of all available backups. Select the required archive. Depending on the type of backup, there may be only one option.

Next, indicate the data that needs to be restored. If you select Files and Folders, you will be prompted to enter required files. Unfortunately, selecting files from multiple directories is next to impossible. Restoring all files or selected files in one directory is much easier. Keep this in mind when creating a backup task.

When restoring files, you must specify the target folder: this can be the same folder that was archived, or any other. You can also specify what should happen to the file being restored if it already exists: create another copy so that both copies are available, overwrite the existing file, or not restore. The recovery process starts immediately.

Using WBADMIN.EXE

If you install the archive tools from the command line, you have a few more options. Open a command prompt window and read the WBADMIN.EXE help. This utility can be used to create a scheduled archiving task, but I still think that in order to complete this task GUI more comfortable. WBADMIN.EXE is more useful for creating one-time backup jobs. Run the following command to see syntax information:

C:\> wbadmin start backup /?

There isn't enough space here to cover all the options, but I'll show you how you can use this utility to periodically copy files to a network volume:

@echo off::Demo-Backup.bat::demonstration script using WBADMIN.EXE on a Windows Server 2008 R2 Server rem backup share UNC set backupshare=\\mycompany-dc01\backup rem files and folders to include set include=c: \scripts,c:\files rem define date time variables for building the folder name set m=%date:~4.2% set d=%date:~7.2% set y=%date:~10.4% set h=%time:~0.2% set min=%time:~3.2% set sec=%time:~6.2% rem defining a new folder like \\mycompany-dc01\backup\RESEARCHDC\12152009_132532 set newfolder=%backupshare%\%computername%\%m%%d%%y%_%h%%min%%sec% echo Creating %newfolder% mkdir %newfolder% rem run the backup echo Backing up %include% to %newfolder% wbadmin start backup -backuptarget:%newfolder% -include:%include% -quiet rem Clear variables set backupshare= set include= set m= set d= set y= set h= set min= set sec= set newfolder=

I don't want to overwrite existing backups so I create new folder with the computer name, and the file name contains a timestamp. This batch file contains all the code needed to complete the task. The script's main function calls WBADMIN.EXE to create a backup at the specified location. When modifying this script, remember to refer to the command syntax help. In this scenario, I like the ability to create my own task using the task scheduler. The backup wizard allows you to create only one task, and using WBADMIN.EXE, you can create as many as you like. I can also use this tool to create system state backups.

To see which backup jobs have been run, run the command: C:\> wbadmin get versions.

Particular attention should be paid to the version identifier, since it is necessary to restore files using WBADMIN (however, this can also be done using the restore wizard).

Backup using Windows PowerShell

Another way to use command line consists of using the Windows Backup PowerShell cmdlets. To access them, you need to download the Windows Backup snap-in:

PS C:\> add-pssnapin Windows.ServerBackup

To see a list of available cmdlets, run the command:

PS C:\> get-command -pssnapin windows.serverbackup

Unfortunately, creating a backup job is a multi-step process. Although necessary commands can be typed into the window sequentially by hand, I prefer to write scripts. Here is a PowerShell version of my original batch file:

#requires -version 2.0 #requires -pssnapin Windows.ServerBackup #Demo-WBBackup.ps1 $policy = New-WBPolicy $files=new-WBFileSpec c:\scripts,c:\files Add-wbFileSpec -policy $policy -filespec $files $backdir=("\\mycompany-dc01\backup\(0)\(1:MMddyyyy_hhmmss)" -f $env:computername,(get-date)) write-host "Creating $backdir" -foregroundcolor Green mkdir $backdir | out-null $backupLocation = New-WBBackupTarget -network $backdir Add-WBBackupTarget -Policy $policy -Target $backupLocation write-host "Backing up $files to $backdir" -foregroundcolor Green $policy Start-WBBackup -Policy $policy

The Windows PowerShell cmdlet philosophy is based on creating and executing policies. The policy contains the files or volumes to include or exclude, the location where the files should be copied, and several other settings. You can also create system state restore jobs and restore an entire server from scratch. In my example, I'm just copying a few directories. For backup, the Start-WBBackup cmdlet is used.

A closer look at the list of Windows Backup cmdlets reveals one clear gap: there are no data recovery cmdlets. I believe that this operation does not need to be automated, although it can be done using WBADMIN.EXE. Perhaps such cmdlets will be added later, but for now, you can use the recovery wizard or WBADMIN.EXE to restore files.

Now you

I'm sure that as you work through these tools on your own, you'll realize that the Windows Backup utility provides many other options besides those listed above. You will also have to evaluate how they fit into your overall strategy backup and business continuity plans. In a certain sense, possibilities free utility Windows archiving is quite limited, but scripting support and the use of VHD files offer a lot of interesting ways to overcome the limitations. You just have to be a little more creative.

Well, as with any other backup software, don't forget to test the recovery process in a non-production environment. You probably will not like to comprehend the basics in the process of actually recovering an environment that has collapsed after an accident, and even with a furious boss behind you. Preliminary training will allow you to emerge from a difficult situation as a winner.

Your data can be encrypted by a virus, it can disappear without a trace on a faulty hard drive. Several hours of work on one file can be ruined by accidentally saving another document on top of it.

The accounting database after a crooked code can turn into a mess and it will contain the contacts of all your counterparties. And someday a competitor will set the authorities on you, which will confiscate your servers and paralyze the work of the entire company, making you eventually bankrupt.

Those files that you do not need now, you may probably need them tomorrow or in 5 years. Where are these files? - Yes, on an old computer / flash drive / formatted removable media ...

All of this should be backed up. In encrypted form (as appropriate), on a backup medium.

How to do this if you have a small company or a personal PC, and Money limited quantity?

one#. Data backup on each standalone computer:

Shadow backup must be configured on user workstations using regular windows tools. (In windows 7 is done through properties icon a computer > Additional system settings > System protection). You can enable both registry backup on changes (checkpoints) and saving file states on local drives. You will have to sacrifice free space on the HDD, but nerves are more expensive.

After unwanted (unintentional) changes to a folder or file, it will be possible to restore their previous state.

If regular backup cannot be used for any of the reasons, you can use third party software such as acronis backup and recovery (paid) or (free). There are a lot of programs on this topic.

However, backing up data within one physical disk will not save you from the danger of its failure. It is difficult to assess the value of a backup when it, along with the original data, is in bad sectors on the HDD :)

Let's just say - backing up the system with regular means: "must have". But try to duplicate important things in the network. For this you can:

a) Use VDS hosting (the cheapest plan with 5GB of space is 100 rubles per month)

b) Use free space on cloud services (google drive, icloud, yandex disk, etc.). For example google drive supports recovery previous versions files. And even if the unintentionally changed file is already synchronized, it can always be restored. You can read helpful tips on google drive.

c) If there are very few files, everything can be stored in the mail. By sending letters with important files to yourself or to a special mailbox. Finding such files will be difficult, however mail systems provide enough disk space for free. In one company that the author serves, most of the files encrypted by the virus were recovered from mail sent to counterparties :)

2#. Data backup in a company with several (and more than 10) workstations.

The ideal option for enterprise backup would be to have a centralized server within the company ( FTP server with RAID 1) or beyond ( VDS server with FTP service).

It is not entirely safe to store, say, a 1C database or contracts on Google Drive. having lost access to mail or if access was in the hands of intruders, the company will definitely suffer. Although the author has acquaintances of individual entrepreneurs who only work in this way. In the latter, everything is placed on the Google drive in encrypted form;)

a) In the case of a server within the company, one-time costs are required for the file server itself (50-100 thousand rubles), depending on the level of reliability. Then the costs can arise when the iron breaks (which does not happen often). Also consider electricity costs.

b) In the case of external storage on VDS, you pay 1 time for setting up an IT outsourcing administrator (around 5 thousand rubles, depending on the number of computers for backup) and monthly 500-900 rubles (depending on the amount of information) behind VDS hosting. Please note that in this case you need a faster Internet connection. At least 5 Mbps upstream speed.

Case b) additionally solves such piquant problems as a sudden server failure, confiscation of the server by authorities :), data theft by company employees who may have physical access to the server, etc.

Below is a schematic representation of backup options for a very small enterprise of 5-30 computers.

In the diagram above - option a). Data from all servers and user workstations is copied to a file server with a fault-tolerant disk subsystem. On the one hand, we have an online backup in the form of a shadow copy at hand, and on the other hand, we can always get the data of different servers at any time when the server (computer) physically fails.

If the company is small, then the roles of the web server, database server and file server can be physically combined on the same platform, and there may not be an application server at all.

On the other hand, all servers can be in a virtual environment on one physical server, and file arrays can be stored on disk shelves (but this is more suitable large companies because of the higher cost).

This scheme has a number of disadvantages - the server must be provided uninterrupted power supply, keep in a special room (ideally) and restrict physical access to it by employees and other unauthorized persons. The author knows a company in which it is considered a tradition (for employees) upon dismissal to steal a hard drive with a database, while the server is still under the table of one of the managers :)

As for the backup settings, the author recommends backing up important data to the file server once a day, and if you have critical data and work with it often, 2 times a day.

Software as an option, you can use Areca (a cross-platform java application) + Windows Task Scheduler. Areca creates a script with backup parameters (where to copy, encryption, type and names of backups) which is added to the windows task scheduler or Unix cron. You can read the article on.

As it seems to the author, option b) is more preferable, because the company almost loses the headache regarding the safety of backup data. But there are also a couple of disadvantages here: - if you use VDS for backup, then this server cannot be combined with anything. Of course, you can also put your applications there (1c), but then, in addition to disk space, you will also have to pay for additional processor time and memory (and these are different amounts).

Another obvious minus is this. And in the absence of a sane provider nearby, you are left with only option a).

So the second option with VDS (b):

The data goes in the same direction as in the first diagram (not shown in the figure), but now everything is sent over the Internet to a remote VDS server. Areca perfectly encrypts data on the user's side and in this form they are placed on the VDS via the FTP protocol. As an FTP server on a VDS You can set up vsftpd pretty quickly, there is an example of setting it up.

It is worth considering one nuance: “Copying files by ftp protocol with SSL or TLS - significantly slows down the process, and with large amounts of data, it may even freeze altogether.

You just need to think over the backup policy, namely: “Collect all important data first inside the network on some network storage (for example, a shared folder) and then under one account FTP to drop them on VDS at the appointed time. Or reset data from all computers at different times under different accounts. The first option will be better if there are more than 5 computers. If the network is small, then a separate network storage no need to highlight.

How to make backups is up to you, the most budgetary backup options were presented here.

Users who read this entry usually read:

In contact with

Any office is full of information. It is often the company's most valuable asset. It is bad that this is remembered when there is a real risk of losing it. And even after a failure, after recovering only part of the information, this lesson is quickly forgotten.

Another administrator will shrug his hands and say: “What to do? There is no budget, there is no understanding on the part of managers, and therefore we don’t have backups either. It breaks - on their conscience. But this is only half the trouble, because you yourself can break it. Incorrect configuration, configuration error, cryptor (encryptor virus) - and the data is irretrievably lost. Therefore, backups are necessary. Having achieved this understanding, you can proceed to the practical part.

In this article, we'll take a look at a possible backup approach for a typical small office running on Microsoft platform, and recommend several options for copy storage equipment. Of course, in a large office or company, everything is different. There are backup storage systems, and tape libraries, and expensive specialized products. And data center backup is both a science and an art to which you can devote not only an article, but your whole life.

Data types and ways to back them up

File servers

To quickly restore files without backups, it is convenient to use the shadow copies mechanism - Shadow Copies of Shared Folders. For its operation, as a rule, it is enough to reserve 5-20% of the disk space on the file server itself. In the schedule for creating a “snapshot” (snapshot), you can specify the end of the working day and noon. A 5% reserve allows you to store about 14 snapshots, the actual number depends on the size of the disk and the intensity of data changes.

Backups can be performed with the built-in Windows Backup tool. There are also fairly reliable tools Cobian Backup And Handy Backup. Cobian Backup- free app, which supports Unicode, FTP, compression, encryption, incremental and differential backups. Handy Backup has more more possibilities, including synchronization and data recovery from backups. We will consider Windows work backup.

Keep in mind that only one copy of data can be saved to a remote network folder on the media server. And the next backup job will overwrite it. But in any case, keeping a single copy of the data is risky.

There is a simple and effective way to bypass this limitation. You need to connect a disk for backups from a backup server using the iSCSI protocol. Windows Backup will consider such a drive as local.

The first backup will be equal to the amount of data stored. Since Windows Backup uses a block backup method rather than a file backup method, the next incremental backup will take as long as the number of disk blocks actually changed.

Incremental backup is a record of only changed data. That is, you do not need to copy the entire database every time, it is enough to create a complete copy of it once, and then make actual changes to it. In this case, the previous version of the data is not saved, the new version is written on top of it.

Differential backup, on the other hand, involves keeping previous versions. For example, if you create a copy of a database every day, you keep all the previous copies for the week. This allows you to quickly roll back to a specific state. In a differential backup, the changed data is written separately from the full copy.

Windows Backup does not require additional settings and fully manages the repository:

Automatic management of full and incremental backups. You no longer need to manage full and incremental backups. Instead, Windows Server Backup will, by default, create an incremental backup that behaves like a full backup. You can recover any item from a single backup, but the backup will only occupy space needed for an incremental backup. In addition, Windows Server Backup does not require user intervention to periodically delete older backups to free up disk space for newer backups-older backups are deleted automatically.


It is advisable to allocate two volumes of actually stored data for backups. This will be enough to store daily copies with a depth of about one and a half to two months. Frequency - daily.

Microsoft SQL servers

Microsoft SQL Servers support three types of backups:
  • Complete. The entire database is copied.
  • differential. The database pages that have changed since the previous backup are copied.
  • incremental. The transaction log is copied (for databases in Full Recovery).
We need to decide how often we create a full backup.
One of the benchmarks is the duration of the backup. It must be done outside business hours or on weekends. The backup operation puts a noticeable load on the server. If it is not possible to complete a full copy at night or on a weekday, then such a job is performed on the weekend.

The second landmark is the volume of differential copies and the duration of differential copying. Each subsequent differential copy becomes larger, as it includes the previous one. The more time has passed since the last full copy, the non-linearly longer it takes to create an incremental one. Indeed, for a full copy, you can read the database files sequentially, and for an incremental one, you need to read the changed pages in random places.

The frequency of incremental backups depends on how much of the database it is acceptable to lose as a result of a failure. If you are prepared to lose one hour of work (that is, restore the database to an hour ago), then incremental backups should be performed once an hour. It is possible more often, but remember about the load on the server. It should be remembered that backing up the database is only one way to ensure the safety of data. If data loss is unacceptable, as well as downtime during data recovery, then use mechanisms such as AlwaysOn and Log Shipping.

An important setting that needs to be done immediately on the server is to enable compression for backups. This will reduce the amount of backup data by almost half. Keep in mind that when you start a backup for the backup file on disk, an amount equal to the actual size of the database minus empty pages will be reserved.

The recommendation for allocating disk space is at least twice the full size of the database. But this minimum requirement: often accountants need to keep a full copy of the database for each of the previous years, as well as full copies for the previous reporting periods in the current year. You may also need to make daily copies with a depth of at least a month.

Typical schedule:

To implement the plan, you can create a "Maintenance Plan" that includes all three types of jobs.

Microsoft Exchange Servers

This product supports two types of backup:
  • Complete. Complete databases and transaction logs are copied.
  • incremental. Only transaction logs are copied.
Regular backups are important because they are the only way to delete ("truncate") transaction logs for mailbases that are not in circular logging mode.

Windows Backup only supports full backups of Microsoft Exchange. To minimize the size of the stored copies, you can use a disk connected via iSCSI, similar to a file server.

Virtual machines

Most backup products allow you to copy a virtual machine with all disks without using agents inside the operating system. Veeam Backup & Replication allows you to perform full and incremental backups, as well as synthesize a new full copy, “rolling” incremental ones onto an old full copy.

The free version allows you to make only a full copy, which negatively affects the backup window and the amount of data transferred. The amount of backup data stored on disk can be reduced by enabling Windows Deduplication. When a copy is made from a virtual machine, a *.vib file is saved on disk, and so on for each virtual machine. They dedupe quite effectively. They created a backup copy at night, deduplicated in a day. This is a tried and tested scheme, but it requires the use of a paid version of the product.

Considering that Windows Deduplication runs in post-processing mode, the recommendation for disk space allocated for storage is at least three full virtual machine sizes. The frequency of copying depends on the server. If it's a web server with static content, then there's no point in copying it more than once a week.

Basic hardware requirements

Disk subsystem

Backup operations usually do not place high demands on the storage subsystem. The master job's recording pattern is linear, and high load with a random I/O profile occurs only during backup deduplication.

You have a choice between 2.5" SFF drives and 3.5" LFF drives. We don't see any good reasons why you should choose SFF disks. This type of disk has a smaller capacity and is more expensive. They are indispensable when you need to remove more IOPS from one server (twice as many disks - twice as many IOPS). For the same reason, most of the proposed SFF drives are SAS with a spindle speed of 10 thousand revolutions.

Optimal choice for the backup server - capacious SATA / SAS disks with a spindle speed of 7200 rpm. At the same time, SAS drives, in theory, give a little more IOPS than their SATA relatives, so if the difference in price is insignificant, then they are preferred. However, in general, disk MTBF is much more important for backup servers.

If you plan to use the function, then obviously the performance of the backup storage should be relatively consistent with the workload. A braking machine is often worse than a non-working one.

If you have purchased software for backup, then the size of the backup will depend on the way the data is stored on the disk, and on the effectiveness of the built-in deduplication/compression mechanisms.

RAM and CPU

RAM and processor requirements vary by backup tool.
For example, for the popular Veeam Backup & Replication they are:
  • One core per concurrent backup job
    (https://helpcenter.veeam.com/backup/hyperv/limiting_tasks.html)
  • 4 GB of memory for product operation plus 500 MB for each concurrent backup job.
In fact, each concurrent backup job uses several agents - one for data transfer, another for compression, and a third for backup deduplication. However, host performance rarely becomes bottleneck. Please note that deduplication in Windows is block-based, with variable length block and compression.

The results of Veeam proprietary deduplication are quite modest, we prefer to do this Windows tools Server 2012 R2. If you plan to use Microsoft deduplication, then you need to be guided by the following system requirements: 1 core and 350 MB of memory per deduplicated volume. The recommended maximum volume size is 2 TB.

The disk size is 1.5Tb, the amount of stored data is 720Gb, without deduplication, the data would take more than 1Tb.

Net

The minimum network interface speed is 1Gbit/s. It is difficult to find equipment that meets this requirement, but the switch can fail - be careful when choosing network port. At 100mbit/s, a backup of 1 Tb of data will last from 28 hours, which looks relatively acceptable. But when you need to make an additional copy during the working day, waiting 10 times longer is more expensive for yourself.

You can try to increase the speed using EtherChannel or several IP addresses, but such configurations are more difficult to maintain, and the resulting speed is not always what you expect.

If you are using VMware virtualization and dedicated SAN network, paid products can significantly increase copying speed by reading data directly from VMFS volumes (SAN Transfer).

We will discuss a few subtleties when choosing a processor and memory in the chapter on choosing a server.

Simple "Business Series" NAS

A typical NAS is a device with a closed proprietary firmware/ operating system, designed to store files in a small office. The functions of most modern NAS include storage and distribution of files via SMB/FTP/HTTP/iSCSI protocols. A friendly web interface is used for configuration. Often, manufacturers use proprietary technologies to create RAID arrays. But you have to pay for the convenience. The business series usually differs from home devices by an on-board processor - instead of ARM, more productive Intel Atom or younger Intel Core i3 are installed.

A typical representative is NETGEAR RN314 (estimated price without disks - 50,000).

pros: relatively inexpensive, hot-swap disk replacement, own software RAID.
Minuses: Low disk capacity (4 disks), poor performance, unable to install backup software directly on the device.

Almost any NAS, even the simplest ones, allows you to connect iSCSI drives. But under load, they work "not very" than less memory in the device and the larger the volume of disks, the more problems there may be. And the access latency is so high that such disks are not suitable except for backups, even the file server will slow down.

Regarding deduplication, Netgear itself writes that it should not be enabled for iSCSI devices. From their article, we can conclude that the method used in their piece of iron is very similar to the similar Oracle ZFS. And ZFS is notorious for the fact that deduplicating a large amount of data requires a huge amount of RAM, which these modest devices do not have.

As for Windows, memory requirements are quite modest. But the iSCSI disk in Windows format Server is a VHD file. VHD deduplication is only supported for the VDI (Virtual Desktop Infrastructure) scenario, so you should test for a backup at your own risk. And risking backups is the last thing.

Deduplication of the data itself stored in Windows Backup archives makes no sense. Since each differential copy saves only the data that has changed, there is nothing to dedupe.

A number of shortcomings can be offset by purchasing a slightly more powerful and capacious device - NETGEAR ReadyNAS 516.

6 drives, Intel Core i3, with the ability to connect up to three additional five-drive modules. The problem is the price - without disks, the device will cost 150,000 rubles.

You can pick up a similarly priced rack-mount model.

The speed of devices of this class is limited by the speed of two not the fastest gigabit network interfaces.

Advanced "Enterprise Grade" NAS

These devices are already entry-level servers with the same proprietary firmware and software RAID.

For example, Netgear RN4220S.

The 2-unit model supports 12 drives with a total raw capacity of up to 48 TB. Two power supplies improve fault tolerance and you won't run out of backups while a new one is being purchased. Packed with just a simple Intel Xeon E3-1225v2 Quad Core 3.2GHz, 8GB RAM and two SFP+ slots for 10Gb Ethernet, this NAS will set you back £400,000 without drives. It is very expensive and not very flexible, especially for a small company.

General Purpose Servers

Normal server will good option if you're willing to tinker with it. No matter which one you choose operating system, - Windows or Linux, - you have ample opportunities to create a configuration for your needs. You can entrust data storage to a good RAID controller with a cache, you can build a software array on Windows Storage Spaces or ZFS - the choice is yours. On the same server, you can install the backup system itself.

When choosing a server form factor, it is optimal to stop at a server with a height of 2U. In such a server, as a rule, you can install 12 LFF (3.5") or 24 SFF (2.5") disks. In addition, it has now become popular to have two slots for SFF disks in the back of the server. They can be used for a system partition or SSD cache.

One or two processors? Server processors can contain from 4 to absolutely fantastic 22 cores on a single chip, so two processors are not a vital necessity for a backup server.

However, in some cases, two processors may cost marginally more or even less than one with the same number of cores. And by installing only one processor, you may encounter the fact that not all will work. PCI-e slots.

An example of such a limitation is described on the Intel website. Lenovo also warns that in an x3650 server with a dual processor motherboard with a single-processor configuration, you will get only one slot at all:

With one processor, only two fixed onboard PCIe slots (Slots 0 and 4) can be used (Slot 5 requires the second processor). An internal storage controller occupies PCIe slot 0.


It is necessary to choose the number of cores that will optimally match the performance of the network and disk subsystem.

For example, if you have two gigabit network cards, then at best the server will be able to transfer data in two to four streams up to 100 Mb / s. (in reality, one stream rarely exceeds 50-60 Mb / s.). For this, 4-6 is enough nuclear processor. If a 10-gigabit card is installed in the server and the configuration network equipment allows you to get the appropriate thread, then our choice is at least 8-12 cores.

It is not necessary to take a top series processor, for our task, the not very powerful E5 is more than enough.

When choosing RAM modules, one should take into account the possibility of multi-channel operation of the processor with memory (optimally - one module per channel), as well as the number of processors. As a rule, the same number of modules is installed on each processor.

Which server model to choose?

If you choose from HP servers, then even the starting line of HPE DL 180 Gen9 dual-unit servers offers servers with a 12-disk basket. To configure a server, you don't need to think about the right cables, available connectors, and other subtle points where you can miss. The configuration wizard will help you do this without errors.

From IBM products, the x3650 M5 model is suitable for a backup server. The TopSeller - 8871EAG configuration has only 8 disk slots and will cost less if you don't need more disks. The most suitable platform is the standard model 8871D4x. Use the Standalone Solutions Configuration Tool (SSCT) to configure the server. When starting the program, do not forget to select the correct country.

Finally, from the products of the third manufacturer of the "Big Three" - Dell - we can recommend the R510 model.

Happy backup, we wish your data to be safe and sound.

Tags:

  • backup
  • backup
  • backup
Add tags

Top Related Articles