34
Enhancing Windows Enhancing Windows Server 2003 Server 2003 Backups Backups Using tools built-in to Server 2003, Using tools built-in to Server 2003, and those available free, to enhance and those available free, to enhance & supplement your Data Backup & supplement your Data Backup strategy. strategy. Presented by: Presented by: Walter J. Alexander, IV Walter J. Alexander, IV Technical Services Supervisor Technical Services Supervisor Shelby County Schools Shelby County Schools

Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

Embed Size (px)

Citation preview

Page 1: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

Enhancing Windows Enhancing Windows Server 2003 BackupsServer 2003 Backups

Using tools built-in to Server 2003, Using tools built-in to Server 2003, and those available free, to enhance and those available free, to enhance

& supplement your Data Backup & supplement your Data Backup strategy.strategy.

Presented by:Presented by:Walter J. Alexander, IVWalter J. Alexander, IV

Technical Services SupervisorTechnical Services SupervisorShelby County SchoolsShelby County Schools

Page 2: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

22AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

How Are You Backing Up Now?How Are You Backing Up Now?

Traditional Backup Software?Traditional Backup Software? Backup Exec, NOVAstor, ARCserve, etc.Backup Exec, NOVAstor, ARCserve, etc.

Windows Built-In NTBACKUP.EXE utility?Windows Built-In NTBACKUP.EXE utility?

Copying data to removable media?Copying data to removable media? Batch FilesBatch Files Scheduled TasksScheduled Tasks

Copying data to another server?Copying data to another server?

ANY OF THESE ARE FINE!

Page 3: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

33AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

What Can I Improve?What Can I Improve?

Faster restoration of data by keeping Faster restoration of data by keeping critical data at your fingertips.critical data at your fingertips.

Multiple levels of protection for critical Multiple levels of protection for critical data.data.

Ability for end-users to restore data Ability for end-users to restore data themselves.themselves.

More efficient use of limited backup More efficient use of limited backup storage space.storage space.

Page 4: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

44AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

How to Improve My StrategyHow to Improve My Strategy

Use NTBACKUP.EXE to create consolidated Use NTBACKUP.EXE to create consolidated collections of important data.collections of important data.Use NTBACKUP.EXE to create System State Use NTBACKUP.EXE to create System State backups for more AD recovery options.backups for more AD recovery options.Use GZIP to compress data before it is written to Use GZIP to compress data before it is written to backup media.backup media.Use Volume Shadow Copies to preserve Use Volume Shadow Copies to preserve multiple versions of files.multiple versions of files.Use Scheduled Tasks to automate much of this.Use Scheduled Tasks to automate much of this.Use Shadow Copy Client to allow end-users to Use Shadow Copy Client to allow end-users to restore their own data.restore their own data.

Page 5: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

55AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

NTBACKUP.EXE BasicsNTBACKUP.EXE Basics

Included in Windows Server for many versions.Included in Windows Server for many versions.Included in Windows XP.Included in Windows XP.Programs… Accessories… System Tools… BackupPrograms… Accessories… System Tools… Backup

Wizard is helpful for learning the utility.Wizard is helpful for learning the utility.Use to backup specific directories to a single file.Use to backup specific directories to a single file.Create Scheduled Tasks for each day of the week to Create Scheduled Tasks for each day of the week to create multiple versions of the backed up data. Use create multiple versions of the backed up data. Use Wizard or use the SchTasks.EXE command.Wizard or use the SchTasks.EXE command.Use GZIP or other compression tool to further compact Use GZIP or other compression tool to further compact this data.this data.

Page 6: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

66AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Setting up NTBACKUP.EXE JobsSetting up NTBACKUP.EXE Jobs

Use the Wizard at firstUse the Wizard at first Select what you want to backup.Select what you want to backup. Setup a schedule to repeat the job.Setup a schedule to repeat the job. Use this Scheduled Task to examine Use this Scheduled Task to examine

command line use of NTBACKUP.EXEcommand line use of NTBACKUP.EXE

Use the Advanced ModeUse the Advanced Mode Make your selections of what to backup.Make your selections of what to backup. Save selections as… (.BKS file).Save selections as… (.BKS file).

Page 7: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

77AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

NTBACKUP.EXE DemoNTBACKUP.EXE Demo

Let’s look at NTBACKUP.EXE…Let’s look at NTBACKUP.EXE…

Page 8: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

88AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

NTBACKUP.EXE ReviewNTBACKUP.EXE Review

.BKS files tell NTBACKUP.EXE what .BKS files tell NTBACKUP.EXE what directories you wish to backup.directories you wish to backup.

.BKF files are the output of .BKF files are the output of NTBACKUP.EXE. These contain the NTBACKUP.EXE. These contain the actual data that has been backed up.actual data that has been backed up.

Page 9: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

99AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

NTBACKUP.EXE GotchasNTBACKUP.EXE Gotchas

.BKS Selection files must be saved with .BKS Selection files must be saved with Unicode encoding.Unicode encoding. From Notepad… choose Save As then pick From Notepad… choose Save As then pick

Encoding: UNICODEEncoding: UNICODE If the file used ANSI encoding, If the file used ANSI encoding,

NTBACKUP.EXE will ignore it’s contents.NTBACKUP.EXE will ignore it’s contents.

Page 10: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1010AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

GZIP Compression UtilityGZIP Compression Utility

GZIP is a free utility available from GZIP is a free utility available from www.gzip.orgGZIP is available for practically every computer platform.GZIP is available for practically every computer platform.GZIP can compress most files to a fraction of their GZIP can compress most files to a fraction of their original size.original size.GZIP.EXE for Windows is a very simple to use GZIP.EXE for Windows is a very simple to use command-line utility.command-line utility.GZIP.EXE can easily be included in batch files and GZIP.EXE can easily be included in batch files and Scheduled Tasks.Scheduled Tasks.GZIP.EXE can be used to both compress and GZIP.EXE can be used to both compress and decompress files.decompress files.GZIP files have a .GZ extension.GZIP files have a .GZ extension.

Page 11: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1111AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

GZIP.EXE SwitchesGZIP.EXE Switches

GZIP.EXE has several switches, the most useful GZIP.EXE has several switches, the most useful I have found are:I have found are: -?-? (this will give you list of switches and short (this will give you list of switches and short

description of what it does)description of what it does) -9-9 (this is the level of compression to attempt… 9 (this is the level of compression to attempt… 9

takes the longest amount of time but also compresses takes the longest amount of time but also compresses the most).the most).

-r-r (this is Recursive… this means that GZIP will (this is Recursive… this means that GZIP will compress every file you specify in subdirectories as compress every file you specify in subdirectories as well).well).

-f-f (this is Force… this will cause GZIP to overwrite (this is Force… this will cause GZIP to overwrite and older zipped file without asking you).and older zipped file without asking you).

Page 12: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1212AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

GZIP ExampleGZIP Example

Example of a GZIP command line.Example of a GZIP command line. gzip -9 -r -f D:\Backups\*.*gzip -9 -r -f D:\Backups\*.*

(This will compress everything not already (This will compress everything not already compressed in the D:\Backups directory using compressed in the D:\Backups directory using maximum compression (-9)maximum compression (-9)

Will compress files in subdirectories (-r)Will compress files in subdirectories (-r)

Will overwrite any older .GZ files (-f)Will overwrite any older .GZ files (-f)

MYFILE.TXTMYFILE.TXT will become will become MYFILE.GZMYFILE.GZ

Page 13: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1313AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

GZIP.EXE DemoGZIP.EXE Demo

Let’s look at GZIP.EXE…Let’s look at GZIP.EXE…

Page 14: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1414AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

GZIP.EXE GotchasGZIP.EXE Gotchas

Make sure that the user that is running the GZIP Make sure that the user that is running the GZIP job has sufficient file system rights to delete job has sufficient file system rights to delete files. Otherwise, you will wind up with both the files. Otherwise, you will wind up with both the original version AND the GZIPped version.original version AND the GZIPped version.Make sure you have enough disk space for the Make sure you have enough disk space for the GZIPped version to “build”.GZIPped version to “build”. Original file is not deleted until the .GZ version is Original file is not deleted until the .GZ version is

completely finished!completely finished!

GZIP must be copied to your servers or GZIP must be copied to your servers or workstations… it is not part of Windows.workstations… it is not part of Windows.GZIP must be in the path for maximum ease of GZIP must be in the path for maximum ease of use. I put it under C:\WINDOWS.use. I put it under C:\WINDOWS.

Page 15: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1515AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Volume Shadow CopiesVolume Shadow Copies

Volume Shadow Copies rely on the Windows Volume Volume Shadow Copies rely on the Windows Volume Shadow Service (VSS).Shadow Service (VSS).

VSS is a set of components that allow backups to be performed VSS is a set of components that allow backups to be performed while data continues to be written to volumes.while data continues to be written to volumes.

VSS provides the behind-the-scenes workings that allow VSS provides the behind-the-scenes workings that allow NTBACKUP.EXE to function.NTBACKUP.EXE to function.

VSS is included in Server 2003.VSS is included in Server 2003.

Volume Shadow Copies are previous versions of files or Volume Shadow Copies are previous versions of files or directories that have changed on your server.directories that have changed on your server.Volume Shadow Copies allow you to restore those Volume Shadow Copies allow you to restore those previous versions very quickly.previous versions very quickly.Volume Shadow Copies are enabled on a per-volume Volume Shadow Copies are enabled on a per-volume basis.basis.

Page 16: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1616AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Volume Shadow Copy StrategyVolume Shadow Copy Strategy

Decide on which volumes you wish to have Decide on which volumes you wish to have Shadow Copies enabled.Shadow Copies enabled. Where is my critical data?Where is my critical data? What data is likely to need a fast or frequent restore?What data is likely to need a fast or frequent restore?

Decide how much disk space to allocate for Decide how much disk space to allocate for Shadow Copies.Shadow Copies. Need at least 300MB of free space.Need at least 300MB of free space. You can limit the space or allow it to fill the volume.You can limit the space or allow it to fill the volume. There is a Maximum of 64 Shadow Copies per There is a Maximum of 64 Shadow Copies per

volume.volume. Oldest Shadow Copies will be deleted as needed.Oldest Shadow Copies will be deleted as needed.

Page 17: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1717AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

More Shadow Copy StrategyMore Shadow Copy Strategy

Decide where the shadow copies will be stored.Decide where the shadow copies will be stored. On the source volume.On the source volume. On another regular volume.On another regular volume. On a dedicated volume (USB, FireWire, other?)On a dedicated volume (USB, FireWire, other?)

Decide how often you need to make shadow Decide how often you need to make shadow copies.copies. Many times per day?Many times per day? Once per day?Once per day? Once per week?Once per week?

Page 18: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1818AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Volume Properties TabVolume Properties Tab

You can use the Shadow Copies tab of the You can use the Shadow Copies tab of the volume Properties to configure everything.volume Properties to configure everything. Let’s take a look…Let’s take a look…

Page 19: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

1919AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Volume Properties Tab ReviewVolume Properties Tab Review

Configuring Volume Shadow Copies using the Volume Configuring Volume Shadow Copies using the Volume Properties Tab…Properties Tab…

My ComputerMy Computer Select the volume (i.e. D: or F:)Select the volume (i.e. D: or F:) Right-click… choose PropertiesRight-click… choose Properties Click the Shadow Copies tab.Click the Shadow Copies tab. Choose the volume on which you wish to enable Shadow Choose the volume on which you wish to enable Shadow

Copies, then click Settings.Copies, then click Settings. Storage AreaStorage Area can be set to any NTFS formatted drive letter. can be set to any NTFS formatted drive letter. Maximum SizeMaximum Size can be No Limit, or you can set a limit (minimum can be No Limit, or you can set a limit (minimum

size 300MB)size 300MB) ScheduleSchedule can be configured for how often you want to create can be configured for how often you want to create

Shadow Copies. Note: The Schedule will create Shadow Copies. Note: The Schedule will create “ShadowCopyVolume” Scheduled Tasks to carry out it’s deeds.“ShadowCopyVolume” Scheduled Tasks to carry out it’s deeds.

Page 20: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2020AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

VSSADMIN.EXE DemoVSSADMIN.EXE Demo

You can perform all setup of VSS and You can perform all setup of VSS and creation of Shadow Copies using the creation of Shadow Copies using the VSSADMIN.EXEVSSADMIN.EXE command. command. Let’s take a look…Let’s take a look…

Page 21: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2121AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

VSSADMIN.EXE ReviewVSSADMIN.EXE Review

Configuring Volume Shadow Copies using the Configuring Volume Shadow Copies using the VSSADMIN.EXE command line utility…VSSADMIN.EXE command line utility… Open a Command PromptOpen a Command Prompt VSSADMIN /?VSSADMIN /? for a list of options. for a list of options. VSSADMIN add shadowstorage /for=D: /on=D: VSSADMIN add shadowstorage /for=D: /on=D:

/MaxSize=2gb /MaxSize=2gb to create storage area.to create storage area. VSSADMIN create shadow /for=D:VSSADMIN create shadow /for=D: to create a to create a

shadow copyshadow copy

You can see how you could consistently You can see how you could consistently configure your Shadow Copy settings.configure your Shadow Copy settings.

Page 22: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2222AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Accessing Shadow CopiesAccessing Shadow Copies

Accessing Shadow Copies allows you to Accessing Shadow Copies allows you to restore older versions of files and folders.restore older versions of files and folders. Let’s take a look…Let’s take a look…

Page 23: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2323AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Accessing Shadow Copies ReviewAccessing Shadow Copies Review

Open the Share.Open the Share.Right-click the file or folder you wish to restore, then choose Right-click the file or folder you wish to restore, then choose Properties.Properties.Click the Click the Previous VersionsPrevious Versions tab. tab.

If you don’t see the tab, maybe you don’t have Shadow Copies setup on If you don’t see the tab, maybe you don’t have Shadow Copies setup on this volume.this volume.

Select from the list of Previous Versions, then choose View, Copy or Select from the list of Previous Versions, then choose View, Copy or Restore.Restore.

View View will let you see the contents of the file. If it’s a folder, you will see will let you see the contents of the file. If it’s a folder, you will see files and subfolders, and you can even copy and paste from there!files and subfolders, and you can even copy and paste from there!

CopyCopy will restore the file or folder to a new location. will restore the file or folder to a new location.I suggest you create a “Restored Data” folder first and target the copied data I suggest you create a “Restored Data” folder first and target the copied data into that.into that.

RestoreRestore will restore the file or folder to it’s original location, overwriting will restore the file or folder to it’s original location, overwriting anything newer that is in that location.anything newer that is in that location.

Page 24: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2424AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Accessing Shadow Copies from ServerAccessing Shadow Copies from Server

If you go My Computer… drive letter, then If you go My Computer… drive letter, then Properties, you will Properties, you will notnot see the Previous see the Previous Versions tab.Versions tab.You You mustmust access the data using the Share in access the data using the Share in order to see the Previous Versions tab.order to see the Previous Versions tab. Easiest way to do this is Start… Run Easiest way to do this is Start… Run \\127.0.0.1

then select the Share name.then select the Share name.

You can also access files or folders on remote You can also access files or folders on remote shares, choose Properties and then choose their shares, choose Properties and then choose their Previous Versions tab.Previous Versions tab.

Page 25: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2525AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Volume Shadow Copy GotchasVolume Shadow Copy Gotchas

Don’t rely too heavily on Volume Shadow Copies.Don’t rely too heavily on Volume Shadow Copies. They could get disabled and you may not know it until it’s too late!They could get disabled and you may not know it until it’s too late! They could disappear unexpectedly.They could disappear unexpectedly.

Overworked processor.Overworked processor. Intensive disk I/O.Intensive disk I/O. Memory shortage.Memory shortage. Windows bug.Windows bug.

When restoring a file, you may need to restore a lot more data than When restoring a file, you may need to restore a lot more data than you really need.you really need.

Decide to what volume you want to restore the data.Decide to what volume you want to restore the data.Target to a volume with plenty of disk space.Target to a volume with plenty of disk space.Create a “RESTORED-DATA” folder on that volume.Create a “RESTORED-DATA” folder on that volume.Use the COPY option.Use the COPY option.

There are special considerations for Clusters.There are special considerations for Clusters. Check Microsoft’s Support Web SiteCheck Microsoft’s Support Web Site

Page 26: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2626AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Volume Shadow Client for XPVolume Shadow Client for XP

Windows XP users will see the Previous Windows XP users will see the Previous Versions tab for files or folders on network Versions tab for files or folders on network shares.shares. The Time Warp Client is no longer needed… it’s The Time Warp Client is no longer needed… it’s

functionality (the Previous Versions tab) built into functionality (the Previous Versions tab) built into newer XP service packs.newer XP service packs.

If they do not have this tab, either Shadow Copies are If they do not have this tab, either Shadow Copies are not setup on this volume, or the XP machine may not not setup on this volume, or the XP machine may not be up to date on MS patches.be up to date on MS patches.

The user can choose to either Restore (overwrite), or The user can choose to either Restore (overwrite), or Copy (re-target) the previous version.Copy (re-target) the previous version.

Page 27: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2727AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Scheduled Tasks OverviewScheduled Tasks Overview

Scheduled Tasks run automatically on Server 2003 and Scheduled Tasks run automatically on Server 2003 and XP.XP.Scheduled Tasks are created by many software Scheduled Tasks are created by many software programs and the operating system itself, especially on programs and the operating system itself, especially on Windows Server 2003.Windows Server 2003.Scheduled Tasks can be created, deleted or modified Scheduled Tasks can be created, deleted or modified using the Control Panel GUI.using the Control Panel GUI.Scheduled Tasks can be created or deleted (not Scheduled Tasks can be created or deleted (not modified) using the SCHTASKS.EXE command line modified) using the SCHTASKS.EXE command line utility.utility.Efficient management of Scheduled Tasks is best Efficient management of Scheduled Tasks is best achieved by creating and following strict naming achieved by creating and following strict naming conventions and methods.conventions and methods.

Page 28: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2828AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Using Scheduled TasksUsing Scheduled Tasks

Scheduled Tasks can be used to automated many processes, Scheduled Tasks can be used to automated many processes, including:including:

NTBACKUP Jobs.NTBACKUP Jobs. Volume Shadow Copies.Volume Shadow Copies. GZIP functions.GZIP functions. Many other GUI Utilities.Many other GUI Utilities. Most command line utilities.Most command line utilities.

Scheduled Tasks are configured to run as a specific user.Scheduled Tasks are configured to run as a specific user. This user must have the right necessary to perform all the functions of This user must have the right necessary to perform all the functions of

the task (running a program, writing files, deleting files, etc).the task (running a program, writing files, deleting files, etc). Password is hard-coded into the task… so….Password is hard-coded into the task… so….

Choose a strong password wisely and don’t use it for any other functions.Choose a strong password wisely and don’t use it for any other functions.If you ever need to change this password, these tasks will need to be either If you ever need to change this password, these tasks will need to be either modified (using GUI), or deleted and re-created (using GUI or Command modified (using GUI), or deleted and re-created (using GUI or Command Line).Line).

Page 29: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

2929AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

SCHTASKS.EXE DemoSCHTASKS.EXE Demo

You can setup (and delete) Scheduled You can setup (and delete) Scheduled Tasks using the Tasks using the SCHTASKS.EXESCHTASKS.EXE command.command. Let’s take a look…Let’s take a look…

Page 30: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

3030AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

SCHTASKS.EXE ReviewSCHTASKS.EXE Review

Creating Scheduled Tasks using the Creating Scheduled Tasks using the SCHTASKS.EXE command line utility…SCHTASKS.EXE command line utility… Open a Command PromptOpen a Command Prompt SCHTASKSSCHTASKS to see a list of current Scheduled Tasks. to see a list of current Scheduled Tasks. SCHTASKS /? SCHTASKS /? to see basic switches. to see basic switches. SCHTASKS /Create /? SCHTASKS /Create /? to see options that go along to see options that go along

with the /Create switch.with the /Create switch.

You can see how you could create (and delete) You can see how you could create (and delete) tasks on remote servers quickly and consistently tasks on remote servers quickly and consistently using the SCHTASKS.EXE command.using the SCHTASKS.EXE command.

Page 31: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

3131AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

SCHTASKS.EXE Example #1SCHTASKS.EXE Example #1

Here’s a sample command line to create a Here’s a sample command line to create a Scheduled Task that runs an NTBACKUP.EXE Scheduled Task that runs an NTBACKUP.EXE job:job:

SCHTASKSSCHTASKS /Create /S/Create /S Server01 Server01 /SC/SC DAILY DAILY /TN/TN MyServer-SystemState-Job MyServer-SystemState-Job /TR/TR “ntbackup backup @c:\ScheduledTaskData\“ntbackup backup @c:\ScheduledTaskData\SystemState.bksSystemState.bks /J SystemState-Daily-Job/J SystemState-Daily-Job

/N SystemStateJob/N SystemStateJob /F d:\backups\Server01-SS.bkf/F d:\backups\Server01-SS.bkf /V:yes /R:no /L:s /M copy /RS:no”/V:yes /R:no /L:s /M copy /RS:no” /ST/ST 01:01:00 01:01:00 /RU/RU MyBackupUser MyBackupUser /RP/RP secretpassword secretpassword

Page 32: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

3232AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

SCHTASKS.EXE Example #2SCHTASKS.EXE Example #2

Here’s a sample command line to create a Here’s a sample command line to create a Scheduled Tasks than runs a GZIP.EXE Scheduled Tasks than runs a GZIP.EXE job:job:

SCHTASKSSCHTASKS /Create /S/Create /S Server01 Server01

/SC/SC DAILY DAILY /TN/TN FileZipper-Job FileZipper-Job

/TR/TR “gzip d:\mybackupfiles\*.* -9 –d –f” “gzip d:\mybackupfiles\*.* -9 –d –f”

/ST/ST 04:00:00 04:00:00

/RU/RU MyBackupUser MyBackupUser /RP/RP secretpassword secretpassword

Page 33: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

3333AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

SCHTASKS.EXE Example #3SCHTASKS.EXE Example #3

Here’s a sample command line to create a Here’s a sample command line to create a Scheduled Tasks that creates a Shadow Copy Scheduled Tasks that creates a Shadow Copy using VSSADMIN.EXE:using VSSADMIN.EXE:

SCHTASKSSCHTASKS /Create /S Server01 /Create /S Server01

/SC DAILY/SC DAILY

/TN VolumeShadowCopy-Fdrive/TN VolumeShadowCopy-Fdrive

/TR “vssadmin create shadow /for=I:”/TR “vssadmin create shadow /for=I:”

/ST 15:06:00/ST 15:06:00

/RU MyBackupUser/RU MyBackupUser

/RP secretpassword/RP secretpassword

Page 34: Enhancing Windows Server 2003 Backups Using tools built-in to Server 2003, and those available free, to enhance & supplement your Data Backup strategy

3434AETA October 2007AETA October 2007 Shelby County SchoolsShelby County Schools

Got a Question?Got a Question?

Drop me an email…Drop me an email…

[email protected]@shelbyed.k12.al.us

Thank You!Thank You!