Выбрать главу

With Wbadmin, you can schedule backups by using the ENABLE BACKUP command. ENABLE BACKUP accepts the following parameters:

■ —addTarget Sets the storage location for backups according to the GUID of the disk you want to use. The GUID of a disk is listed as the disk identifier in the output of the Wbadmin GET DISKS command.

■ —removeTarget Sets the storage location to remove from the backup schedule according to the GUID of the disk you want to use. The GUID of a disk is listed as the disk identifier in the output of the Wbadmin GET DISKS command.

■ —include Sets a comma-delimited list of volume drive letters, volume mount points, and GUID volume names to back up.

■ —allCritical Includes all operating system volumes in the backup automatically.

■ —quiet Specifies that you want to run the command with no prompts to the user.

To understand how ENABLE BACKUP is used, consider the following examples:

Schedule a backup for C and D at 9:00 P.M. daily

wbadmin enable backup -addTarget:{06d88776-0000-0000-0000-000000000000}

-schedule:18:00 -include: c:,d:

Schedule a backup for all operating system volumes at 6:00 A.M. and 9:00 P.M. daily

wbadmin enable backup -ddTarget:{06d88776-0000-0000-0000-000000000000}

-schedule:06:00,18:00 -allCritical

Modifying or stopping scheduled backups

After you’ve configured scheduled backups on a server, you can modify or stop the scheduled backups by following these steps:

1. Start Windows Server Backup. Tap or click Backup Schedule on the Action menu or in the Actions pane to start the Backup Schedule Wizard. Tap or click Next.

2. On the Modify Scheduled Backup Settings page, tap or click Modify Backup if you want to add or remove backup items, times, or targets, and then follow steps 3–7 in the section “Configuring scheduled backups” earlier in the chapter. If you want to stop the scheduled backups from running, tap or click Stop Backup, tap or click Next, and then tap or click Finish. When prompted to confirm, tap or click Yes, and then tap or click Close.

NOTE Stopping backups releases backup disks for ordinary use. Backup archives are not deleted from the backup disks and remain available for use in recovery.

With Wbadmin, you can modify scheduled backups by using the ENABLE BACKUP command. For targets, you must use the -addTarget and -removeTarget parameters to modify the target disks. For the run schedule and included volumes, you just set the new values you want to use. Consider the following examples:

Adding a new target to scheduled backups

wbadmin enable backup -addTarget:{41cd2567-0000-0000-0000-000000000000}

Removing a target from scheduled backups

wbadmin enable backup -removeTarget:{06d88776-0000-0000-0000-000000000000}

Modifying the run schedule and included volumes

wbadmin enable backup -schedule:03:00 -include: c:,d:,e:

Creating and scheduling backups with Wbadmin

One way to create manual backups is to use the Wbadmin START BACKUP command. START BACKUP accepts the following parameters:

■ —backupTarget Sets the storage location for the backup as either a drive letter or UNC path to a shared folder on a remote server.

■ —include Sets a comma-delimited list of volume drive letters, volume mount points, and GUID volume names to back up.

■ —allCritical Includes all operating system volumes in the backup automatically.

■ —inheritAcl Specifies that you want the backup folder at the remote shared folder to inherit the security permissions of the shared folder. If you do not specify this parameter, the backup folder is accessible only to the user you specify in the -user parameter, administrators, and backup operators.

■ —noVerify Specifies that you do not want to verify backups written to removable media. If you do not specify this parameter, backups written to removable media are verified.

■ —password Sets the password to use when connecting to the remote shared folder.

■ —quiet Specifies that you want to run the command with no prompts to the user.

■ —user Sets the user name to use when connecting to the remote shared folder.

■ —vssFull Specifies that you want to perform a full backup by using VSS, which ensures that all server and application data is backed up. Do not use this parameter if you are using a third-party backup utility to back up application data.

To understand how START BACKUP is used, consider the following examples:

Performing a full backup of the server

wbadmin start backup -backupTarget: f: -vssfull

Backing up C and D to F

wbadmin start backup -backupTarget: f: -include: c:,d:

Backing up all critical volumes

wbadmin start backup -backupTarget: f: -allCritical

Backing up C and D to a remote shared folder

wbadmin start backup -backupTarget: \\fileserver27\backups -include: c:,d:

-user: williams

If you want to create a schedule to run backups at different times on different days, you can use Task Scheduler to create the necessary tasks to run this command on the schedule you set. You can use Task Scheduler and Wbadmin to schedule tasks to run backups by following these steps:

1. In Computer Management, tap or click Task Scheduler. You are connected to the local computer by default. As necessary, connect to the computer that you want to access.

2. Press and hold or right-click the Task Scheduler node, and then tap or click Create Task. This opens the Create Task dialog box.

3. On the General tab, enter the name of the task, and then set security options for running the task.

If the task should run under a user other than the current user, tap or click Change User Or Group. In the Select User Or Group dialog box, select the user or group under which the task should run, and then provide the appropriate credentials when prompted later.

Set other run options as necessary. By default, tasks run only when a user is logged on. If you want to run the task regardless of whether a user is logged on, select Run Whether User Is Logged On Or Not. You can also elect to run with highest privileges and configure the task for earlier releases of Windows.

4. On the Triggers tab, tap or click New. In the New Trigger dialog box, select On A Schedule in the Begin The Task list. Use the options provided to set the run schedule, and then tap or click OK.

5. On the Actions tab, tap or click New. In the New Action dialog box, select Start A Program in the Action list.

6. In the Program/Script text box, enter %windir%\System32\wbadmin.exe .