You are on page 1of 6

Windows Server Backup (WSB) is the built-in backup

solution for Windows Server 2008 that replaces the


venerable NT Backup from Windows Server 2003 and
before. WSB protects the files and the server
os/application binaries within itself as a single-server
solution. To consolidate protection across multiple
servers or applications like SQL Server, Exchange,
SharePoint or Hyper-V, then Microsoft would
recommend looking at System Center Data Protection
Manager (DPM).

By design, WSB ensures that you have recent backups


by performing its local backup operations at least once
per day. While this is good and recommended there
may be reasons specific to your environment where
you may want to take backups at a lesser frequency or
have multiple backup schedules (e.g. daily and
weekly). For example, you may want to backup your
files every day, while backing up the system state at
lesser frequency say once a week.

You can extend the functionality of Windows Server


Backup to meet all these advanced needs through
simple scripts that uses Windows Server Backup
Command Line Tool (WBADMIN) and the Windows
Task Scheduler (SCHTASKS).
If you are not aware of Task Scheduler, it is a a
management application provided in Windows
operating systems that allows you to schedule any task
for a given set of conditions. Task Scheduler also
provides a command line interface (CLI) through the
command SCHTASKS.
Samples
The samples here assume the following configuration
of the system:
A single disk containing system drive (C:),
Two data volumes (D: and E:)
Dedicated backup volumes (H:, I: and J:).
These volume names and parameters are used as
boldface in the samples below. Readers can customize
them as per their requirements.
Sample 1: Daily Data Volume Backup
The following command will create a Task Scheduler
task named DailyVolumeBackup with the start time
of 23:00. This task will run DAILY with
the HIGHEST privileges. It will run the Windows
Server Backup CLI to backup volume E: to target
volume H:.

Syntax:
SCHTASKS /Create /SC DAILY
/TN <TaskName> /RL HIGHEST
/ST <StartTime> /TR <Windows Server Backup
Command>

Example:
SCHTASKS /Create /SC DAILY
/TN DailyVolumeBackup /RL HIGHEST
/ST 23:00 /TR WBADMIN START BACKUP -
backupTarget:H: -include:e: -quiet >>
C:backupLogs.txt
Sample 2 : Weekly Backup of System State
The following command will create a Task Scheduler
task named WeeklySystemStateBackup that runs
every Saturday (SAT) at 19:00. This task will
run WEEKLY with the HIGHEST privileges. It will run
the Windows Server Backup CLI to
backup SYSTEMSTATEBACKUP to target volume I:.
Syntax:

SCHTASKS /Create /SC WEEKLY /D <Day Of


Week> /TN <TaskName> /RLHIGHEST
/ST <StartTime> /TR <Windows Server Backup
Command>

Example:
SCHTASKS /Create /SC WEEKLY
/D SAT /TN WeeklySystemStateBackup /RLHIGHEST
/ST 19:00 /TR WBADMIN START
SYSTEMSTATEBACKUP -backupTarget:I: -quiet >>
C:backupLogs.txt
Sample 3 : Complete System Backup Once in Two Weeks
The following command will create a Task Scheduler
task named OnceInTwoWeeksFullBackup that runs
every Sunday (SUN) at 1:00 once every 2 weeks. This
task will run WEEKLY with the HIGHEST privileges. It
will run the Windows Server Backup CLI to
backup allCritical volumes to target volume J:.

Syntax:
SCHTASKS /Create /SC WEEKLY
/MO <WeekFrequency Modifier> /D <Day Of
Week> /TN <TaskName> /RL HIGHEST
/ST <StartTime> /TR <Windows Server Backup
Command>

Example:
SCHTASKS /Create /SC WEEKLY
/MO 2 /D SUN /TN OnceInTwoWeeksFullBackup /RL
HIGHEST /ST 01:00 /TR WBADMIN START
BACKUP -backupTarget:J: -allCritical -quiet >>
C:backupLogs.txt
Configuracin de copias de
seguridad automticas con
el Programador de tareas
Se aplica a: Windows Server 2008 R2
Si desea crear una programacin para ejecutar copias de seguridad en distintas horas de das
diferentes, puede usar el Programador de tareas para crear una serie de tareas que ejecuten el
comando Wbadmin start backup con la programacin deseada o para iniciar un archivo por
lotes. Estas tareas no aparecern en el complemento MMC (Microsoft Management Console) de
Copias de seguridad de Windows Server. Sin embargo, si lo hace as, debe asegurarse de que las
copias de seguridad que se ejecutan como parte de la programacin personalizada no se
superpongan con las que se ejecutan como parte de la programacin peridica. Si existen
conflictos, se producir un error en una de las operaciones de copia de seguridad. La tarea
siguiente usa la sintaxis de comando de Windows Server 2008 R2.
Para usar el Programador de tareas y el comando Wbadmin para crear una programacin
de copia de seguridad
1. Haga clic en Inicio, Herramientas administrativas y, a continuacin, en Programador
de tareas.
2. En el panel Acciones, haga clic en Crear tarea.
3. En la ficha General, active la casilla Ejecutar con los privilegios ms altos.
4. En la ficha Acciones, haga clic en Nuevo y, a continuacin, realice lo siguiente:
a. En la lista desplegable Acciones, haga clic en Iniciar un programa.

b. En Programa o script, escriba:

%windir%\System32\wbadmin.exe

c. En Agregar argumentos, escriba:

start backup [-backupTarget:{<volumenDeDestino> |


<recursoCompartidoDeRedDeDestino>}] [-
include:<elementosParaIncluir>] [-
nonRecurseInclude:<elementosParaIncluir>] [-
exclude:<elementosParaExcluir>] [-
nonRecurseExclude:<elementosParaExcluir>] [-allCritical] [-systemState] [-
noVerify] [-user:<nombreDeUsuario>] [-password:<contrasea>] [-
noInheritAcl] [-vssFull | -vssCopy] [-quiet]

Para ver ayuda de este comando, escriba lo siguiente en la lnea de comandos:


wbadmin start backup /?
5. Repita el paso 4 para cada copia de seguridad que desee agregar.
6. Para los dems campos, siga las instrucciones generales de la ayuda del Programador
de tareas para programar una tarea.
Consideraciones adicionales
Para configurar una copia de seguridad programada, debe ser miembro del grupo
Administradores u Operadores de copia de seguridad, o bien tener delegada la
autoridad correspondiente.

Tambin puede realizar esta tarea directamente con el comando Schtasks. Para obtener
ms informacin, vea http://go.microsoft.com/fwlink/?LinkId=143764 (puede estar en
ingls). Para consultar la sintaxis de Schtasks, vea la referencia de comandos
en http://go.microsoft.com/fwlink/?LinkID=143763 (puede estar en ingls).

Tambin puede realizar esta tarea de forma remota para otro servidor que use la
opcin Conectarse a otro equipo del complemento MMC de Copias de seguridad de
Windows Server. Asegrese de ser miembro del grupo Administradores u Operadores
de copia de seguridad del servidor remoto. Si es un operador de copia de seguridad,
asegrese de que la configuracin de seguridad de DCOM (Modelo de objetos
componentes distribuido) del equipo remoto permite a los operadores de copia de
seguridad conectarse a l.

Solo puede usar esta caracterstica si los servidores local y remoto ejecutan la misma
versin de Windows, es decir, si ambos ejecutan Windows Server 2008 o Windows
Server 2008 R2. Adems, no se puede usar esta caracterstica para administrar un
equipo que ejecute cualquier versin de sistema operativo cliente de Windows.

You might also like