loading...

Windows Server 2019 – Back up and restore

How to Install Intellij IDEA on Windows 10

The need to back up and occasionally to restore your servers is, unfortunately, still present in Windows Server 2019. I dream of a day when servers are 100 percent reliable and stable throughout their lifetimes, unaffected by viruses and rogue software, but today is not that day. While there are many third-party tools available on the market that can improve and automate your backup experience when managing many servers, we do have these capabilities baked right into our own Server 2019 operating system, and we should all be familiar with how to utilize them.

Schedule regular backups

Logging into your servers and launching a manual backup task every day is obviously not feasible for most of our organizations, as the process of running backups would turn into our full time job. Thankfully, the Windows Server Backup feature gives us the option to create a backup schedule. This way, we can define what we want to back up, where we want to back it up to, and how often this backup should run. Then we can sit back, relax, and know that our systems are performing this task on their own.

Before we can do anything with backups, we need to install the appropriate feature inside Windows. Using your Add roles and features link, go ahead and install the feature called Windows Server Backup. Remember that I said feature—you won’t find Windows Server Backup on the primary Server Roles selection screen; you need to move ahead one screen further in the wizard to find Features. Once the feature has finished installing, you can launch the Windows Server Backup console that is available inside the Tools menu of Server Manager. Once inside, click on Local Backup in the left-side window pane and you will see some Actions appear on the right-hand side of your screen.

As you can see, there is an option listed here called Backup Once… that would, as the name implies, perform an ad hoc backup job. While this is a nice feature, there is no way that any server administrator is going to log into all of their servers and do this every day. Instead, clicking on the Backup Schedule… action will launch a configuration wizard for creating a scheduled, recurring backup job:

The first option you come across is deciding what it is that you want to back up. The default option is set for Full server, which will take a backup of everything in the operating system. If you want to customize the amount of data that is being backed up, you can choose the Custom option and proceed from there. Since I have lots of disk space available to me, I am going to stick with the recommended path of creating full server backups.

Next, we get to the real advantage of using the scheduling concept: choosing how often our backup is going to run. The most common way is to choose a particular time of day, and let the backup run every day at that allotted time. If you have a server whose data is being updated regularly throughout the days and you want to shorten your window of lost information in the event of needing to perform a restore, you can also specify to back up multiple times per day:

The last screen where we need to make a decision for our scheduled backups is the Specify Destination Type screen, where we determine the location that our backup files are going to be stored. You can see there are a couple of different options for storing the backup locally on the physical hard disks of the same server where you are configuring the backups. Storing backup files on a local, dedicated disk, or volume, can be advantageous because the speed of the backup process will be increased. For servers that you are trying to back up on workdays in order to continually back up data, you would likely want to choose a local backup option so that those backups run quickly and smoothly. Another advantage to using a locally connected disk for backups is that you can create multiple rollback points within your backup schema, keeping multiple days’ worth of backup information in case you need to roll back to a particular point in time.

However, I find that most admins prefer to keep all of their backup files in a centralized location, and that means choosing the third option on this screen, the one entitled Back up to a shared network folder. By choosing this option, we can specify a network location, such as a file server or drive mapping to a NAS, and we can set all of our different servers to back up to this same location. That way we have a central, standardized location where we know that all of our backup files are going to be sitting in the event that we need to pull one out and use it for a restoration.

I cannot tell you which option is best, because it depends on how you are planning to utilize backups in your own environment. The screen where we choose which destination type we want for our backups includes some good text to read over related to these options, such as the important note that when using a shared network folder for backups, only one backup file can be stored at a time for your server, because the process of creating a new backup on the following day will overwrite the previous backup:

Once you have chosen a destination for your backups, and specified a network share location if that is the option you have chosen, you are finished in the wizard. Your backup jobs will automatically kick off at the allocated time that you specified during the wizard, and tomorrow you will see a new backup file existing for your server. If you are impatient, like, me and want to see the backup job run right now, you can walk through the other Action available in the Windows Server Backup console called Backup Once… in order to run a manual backup right away:

Restoring from Windows

Since you are being diligent and keeping good backups of your servers, the hope is then that you will never have to actually utilize those backup files in order to restore a server. But, alas, the time will probably come when you have a server that goes sideways, or some data is accidentally deleted, and you must revisit the process of restoring data or an entire server in your infrastructure. If your server is still online and running, the restore process is quite easy to invoke from the same Windows Server Backup console. Open up the console, and choose the Action that says Recover….

This invokes another wizard that walks us through the recovery process. First, we specify the location of our backup file. If you have a dedicated backup location on the local server, it is pretty simple to find; otherwise, like in my example, where we specified a network location, you choose A backup stored on another location, and then choose Remote shared folder in order to tell it where to find that backup file:

Based on the backup location that you have chosen, the wizard will now identify all available rollback dates that are available within the backup files. If you have stored your backup files on a local disk so that multiple days’ worth of rollback points are available, then you will see numerous dates available to click on. For me, since I chose to store my backups on a network location, that means only one day’s worth of backup information is available, and yesterday’s date is the only one which I can choose. So I will choose to restore yesterday’s backup, and continue on through the wizard.

Now that we have identified the specific backup file that is going to be used for recovery, we get to choose what information from that backup is going to be restored. This is a nice piece of the recovery platform, because, often, when we need to restore from backup, it is only for specific files and folders that may have been deleted or corrupted. If that is the case, you choose the top option,  Files and folders. In other cases, you may want to roll the entire server back to a certain date, and for that functionality you would choose to recover an entire Volume. Right now, I am just missing a few files that somehow disappeared between yesterday and today, so I am going to choose the default Files and folders option.

The Select Items to Recover screen is now presented, which polls the backup file and displays to me the entire list of files and folders within the backup file, and I simply choose which ones I want to restore. This kind of recovery can be critical to your daily management of a file server, where the potential is high for users to accidentally delete information:

All that remains is to specify where you want these recovered files to be restored. You can choose for the recovered files to be placed back in their original location, or if you are running this recovery process on a different machine, you can choose to restore the files to a new location from which you can grab them and place them manually wherever they now need to reside.

Restoring from the installer disc

Recovery from the console inside Windows is a nice wizard-driven experience, but what about in the case where your server has crashed hard? If you cannot get into Windows on your server, you cannot run the Windows Server Backup console in order to initiate your recovery process. In this case, we can still utilize our backup file that has been created, but we need to use it in combination with a Windows Server 2019 installation disc, from which we can invoke the recovery process.

It is important to note that this recovery process cannot access locations on the network, and your backup file will have to be stored on a disk attached to your server. You can utilize a USB drive for this purpose during the recovery process, if you did not originally set up your backup job to store onto an existing locally attached disk.

To make things interesting, I’m going to crash my own server. This is the server that we took a backup of a few minutes ago. I accidentally deleted some very important files in my C:\Windows directory. Whoops! Now this is all I see when I try to boot my server:

That’s not a very friendly screen to see first thing in the morning! Since I seem to be stuck here and unable to boot into Windows, my chances of running the recovery wizard are nil. What to do? Boot to the Windows Server 2019 installer DVD? No, I do not want to install Windows afresh, as all of my programs and data could be overwritten in that scenario. Rather, once I get into the installer screens, you will notice that there is an option down in the corner for Repair your computer. Choose this option in order to open up the recovery options that are available to us on the installation DVD.

Now you see the screen adjust to a new blue hue, indicating that we have entered a special portion of the installer disc. If we click on the Troubleshoot button, we can see all of the options that we have available:

If you think you can fix whatever the issue is from  Command Prompt, choose that option and try to fix it yourself. For our example, I am pretty sure that I significantly hosted the operating system, so I am going to do a full System Image Recovery and click on that button:

As long as you have a hard drive connected that contains a Windows Server Backup file, the wizard launches and pulls in the information about the backup. Since I had originally chosen to store my backup file on a network location, I copied the backup files down to a disk and connected it as a second disk into my server. The wizard automatically recognizes that backup file, and displays it in the Select a system image backup screen:

Now, by simply clicking on Next a few times to progress through the wizard, my backup image is restoring onto my server:

Once the restore process has completed, the system reboots and launches itself right back into Windows, where it is fully functional back to the restore point. My test server doesn’t have much of anything running on it, so the time that it took to restore was pretty minimal and a production box may take a little longer, but I’d say that 20 minutes from blowing up the server to being fully recovered is a pretty awesome length of time!

Keeping good and recent backup files is critical to your operation’s sustainability. I have worked on quite a few systems where the admins took some manual backups after getting their servers initially configured, but never set up a regular schedule. Even if the data on the server never changes, if you are part of a domain, you never want to do this. In the event that a server fails and you need to recover it, restoring a backup that is only a few days old will generally recover well. But if you restore an image that is 6 months old, Windows itself will come back online with no problems and all of your data will exist, but in that amount of time your computer account for that server would most certainly have fallen out of sync with the domain, causing you authentication errors against the Domain Controllers. In some cases, you may even have to do goofy things like disjoin and re-join the server to the domain following the image restoration in order to recover communications to the domain. If you had kept regular backups from which to restore, you would not have to deal with those issues.

Comments are closed.

loading...