- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- Thomas Lee
- 507字
- 2021-07-02 18:16:04
Introduction
The ability to backup and restore a Windows Server has been a feature of Windows since the first version of Windows NT, released in 1993. In the early days, you used NTBackup (via a GUI) to carry out backup and restore activities. With Server 2008, Windows Server Backup replaced NTBackup and offered 15 cmdlets (provided in an old-school PS Snap-in) to augment the GUI. The Snap-in was replaced with a module, WindowsServerBackup, and was improved with Server 2012. The module remains unchanged in Server 2016 and provided 49 cmdlets.
Windows Server Backup (WSB) provides a set of features to enable you to backup and restore files, folders, and Hyper-V VMs as well as an entire system. These features are more than adequate for many organizations and come for free with Windows Server 2016. Nevertheless, some organizations need more functionality. There is a rich third party backup industry with a variety of competing products that deliver more than the in-box Windows Server Backup offers. This chapter concentrates on Windows Server Backup and Azure backup.
Windows Server Backup backs up both entire volumes as well as specific files and folders. You can tell WSB both to include and to exclude specific files/folders from the backup (include C: Data, C: HyperV, C: foo; exclude *.tmp,*.bak, and C: Foobin). And WSB makes it simple to backup and restore a Hyper-V Virtual Machine (VM). What you backup, you can restore: you can restore entire volumes, individual files or folders, restore a VM, and restore the system state to a new machine (aka bare metal recovery).
The recipes in this chapter show how to setup your backup policy, to configure what/where/when/how to backup and how to recover.
With the growth in cloud computing, an increasing number of organizations utilize cloud backup as an alternative to or in addition to using on-premises (and private cloud) resources. Azure Backup is an Azure service that backs up your on-premises systems to the cloud and enables file/folder/volume/system restores. Our final recipe in this chapter shows how you can do a backup to Azure and how to restore.
The recipes in this chapter make use of the PSRV server which you set up in Chapter 4, Managing Printers and other servers in the Reskit.Org domain—each recipe indicates the specific servers to use. But feel free to use other server names, different disk layouts, and so on—adjusting the recipes accordingly.
Most of the recipes in this chapter rely on cmdlets in the WindowsServerBackup module. We also make use of the console application Wbadmin and the Azure Resource Management cmdlets. In some cases, such as backing up and restoring Hyper-V, you may find it easier to use the Wbadmin console application—you have choices! And as icing on the cake, the final recipe used both the AzureRM cmdlets and the Azure backup cmdlets and the recovery agent.
You have choices! And as icing on the cake, the final recipe used both the AzureRM cmdlets and the Azure backup cmdlets and the recovery agent.