Книга: Windows Server 2012 R2 Storage, Security, & Networking Pocket Consultant

Getting started with the Backup Command-Line utility

Getting started with the Backup Command-Line utility

Wbadmin is the command-line counterpart to Windows Server Backup. You use Wbadmin to manage all aspects of backup configuration that you would otherwise manage in Windows Server Backup. This means you can typically use either tool to manage backup and recovery.

After you install the Backup Command-Line Tools feature as discussed earlier in the chapter, you can use Wbadmin to manage backup and recovery. Wbadmin is located in the %SystemRoot%System32 directory. This directory is in your command path by default, so you do not need to add it. You can run Wbadmin by following these steps:

1. Open an elevated, administrator command prompt. One way to do this is to enter cmd in the Everywhere Search box, press and hold or right-click Command Prompt in the Apps list, and then tap or click Run As Administrator.

2. In the Command Prompt window, enter the necessary command text or run a script that invokes Wbadmin.

REAL WORLD By default with Windows Server 2012 R2, the command prompt and the administrator command prompt are options on the shortcut menu that is displayed when you right-click in the lower left corner or press Windows key + X. The alternative is for the Windows PowerShell prompt and the administrator Windows PowerShell prompt to be displayed on this menu. To configure which options are available, on the desktop, press and hold or right-click the taskbar, and then select Properties. In the Taskbar And Navigation Properties dialog box, on the Navigation tab, select or clear the Replace Command Prompt With Windows PowerShell check box as appropriate.

Wbadmin has a number of associated commands, which are summarized in Table 11-2.

TABLE 11-2 Wbadmin management commands

COMMAND DESCRIPTION
DELETE SYSTEMSTATEBACKUP Deletes the system state backup or backups from a specified location.
DISABLE BACKUP Disables scheduled daily backups so that they no longer run.
DELETE BACKUP Deletes one or more backups.
ENABLE BACKUP Enables or modifies a scheduled daily backup.
GET DISKS Lists the disks that are currently online for the local computer. Disks are listed by manufacturer name, type, disk number, GUID, total space, used space, and associated volumes.
GET ITEMS Lists items contained in a specified backup.
GET STATUS Reports the status of the currently running backup or recovery job.
GET VIRTUAL MACHINES Lists the currently configured virtual machines.
GET VERSIONS Lists details about the available backups stored in a specific location, including the backup time and backup destination.
START BACKUP Starts a one-time backup by using the specified parameters. If no parameters are passed and scheduled backups are enabled, the backup uses the settings for scheduled backups.
START RECOVERY Initiates a recovery of volumes, applications, or files by using the specified parameters.
START SYSTEMSTATEBACKUP Starts a system state backup by using the options specified.
START SYSTEMSTATERECOVERY Starts a system state recovery by using the specified parameters.
STOP JOB Stops the currently running backup or recovery job. Stopped jobs cannot be restarted from where they were stopped.

When you are working with Wbadmin, you can get help on available commands:

? To view a list of management commands, enter wbadmin /? at the command prompt.

? To view the syntax for a specific management command, enter wbadmin Command /?, where Command is the name of the management command you want to examine, such as wbadmin stop job /?.

When you work with Wbadmin, you’ll find that just about every command accepts parameters and specific parameter values that qualify what you want to work with. To understand more clearly how this works, consider the following syntax example:

wbadmin get versions [-backupTarget:{VolumeName | NetworkSharePath}] [-machine: BackupMachineName]

The brackets tell you that -backupTarget and -machine are optional. Thus, you could enter the following to get information on recoverable backups on the local computer:

wbadmin get versions

You could enter the following to get information on recoverable backups stored on the F drive:

wbadmin get versions -backupTarget: f:

Or you could enter the following to get information on recoverable backups stored on the F drive on Server96:

wbadmin get versions -backupTarget: f: -machine: server96

Many Wbadmin commands use the -backupTarget and -machine parameters. The backup target is the storage location with which you want to work and can be expressed as a local volume name, such as F:, or as a network share path, such as FileServer32backupsServer85. The -machine parameter identifies the computer you want to work with for backup or recovery operations.

Оглавление книги


Генерация: 1.094. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз