Schedule Server 2003 Backup Batch File
About System Image
Generally speaking, system image is an exact copy of drives required for Windows to run,containing operating system, hardware drivers, applications you have installed, settings,preferences, etc. typically the C drive (System), EFI System Partition, or RecoveryPartition, etc. Sometimes it also include additional drives. You could restore your computer with the system image without reinstallingeverything if the hard drive or computer stop working. However, you could not restore theindividual items from the system image.
Create System Image with Backup Utility
To create a system image in Windows Server 2003, you could try Backup Utility built-in Windows Server 2003, this backup softwarewill help you to backup all the data on this computer and create a system recovery disk torestore Windows in case of system failure.
1. Please go to Start -> All Programs -> Accessories-> System Tools -> Backup to open Backup Utility(Backup or Restore Wizard).
If you have a.BAT file and you’re trying to get it to run automatically using Task Scheduler in Windows, you might have run into the issue where it simply doesn’t run unless you manually run the task. I created a batch file that deletes everything inside a temp folder whenever the computer starts up.
- I am using SQL Server Express edition, so there is no features for backup plan, I want to take databases backup using bat script, and create a scheduler to be run everyday. I have created.bat file but need to place a time stamp at the end of backup file like test13April2017.
- You can't schedule a backup operation. The Task Scheduler service must be running before you can schedule a backup. If the Task Scheduler service isn't already running, follow these steps to start it: Click Start, and then click Run. In the Open box, type cmd, and then click OK. At the command prompt, type net start schedule, and then press ENTER.
2. Tap Next in next window.
3. Choose Back up files and settings option, press Next.
4. Select All information on this computer to backup, and then clickNext.
5. Find a destination path to save the system image by clicking Broswe, andrename the backup, then choose Next.
6. Overview the detailed information of the backup, select Finish to startcreate system image for Windows Server 2003. And you will get the backup file (.bkf)
Besides, you could go to Advanced Options -> choose Automated System Recovery Wizard inWelcome tab to create a system image for Windows Server 2003.
Create a system image with NTBackup
NTBackup allows you to create a system state backup, here is the command:
ntbackup backup systemstate /j 'My Backup Job 3' /F 'C:backup.bkf'
However, the system state backup could not restore your system files and Windows, if you wantto create a system image to restore your Windows Server 2003, assume only C drive, noRecovery partition or others system partition, input the command:
ntbackup backup C: /j 'My Backup Job' /F 'C:backup.bkf'
If you create system image to USB flash drive in Windows 7/8/10, you may encounter the error,this drive is not a valid backuplocation.
NTBackup has many parameters you have to specify for backups and it’s not easy tooperate.
Besides, you could create a shadow copy for your system partition: right click the C drive inWindows file explorer and choose Properties, click Shadow Copies tab, then Enable the shadowcopy for C drive.
However, you could not restore system files because the volume that contains the operatingsystem files cannot be reverted. Therefore, it’s recommended to backup your data drive withshadow copy.
Best Windows Server 2003 Backup Software
How to create Server 2003 image backup in an easier way? the best Windows server backupsoftware – AOMEI Backupper Server willhelp you. It’s available for Windows Server 2003 (R2) 2008, 2012 (R2), 2016, 2019, andWindows XP, Vista, 7, 8, 8.1, 10. Now, download AOMEI Backupper Server first, and thenfollow the steps to create a system image in Windows Server 2003:
Download Free Trial
Windows PCs & Servers
Secure Download
Step 1: Launch AOMEI Backupper server. Select Backup -> SystemBackup on the main window.
Step 2: Rename the Task Name if required. Choose a destination location tosave the Windows Server 2003 system image backup.
Tips:
It’s highly recommend to save the Windows Server image backup to external hard drive,like USB flash drive, SSD, NAS, network share, etc.
The system partition associated with system files, boot files, will be selectedautomatically.
Step 3: Click Start Backup button to create a system image backup forWindows Server 2003.
Besides, there are multiple optional settings for you to configure if youwant:
1. Options: you could compress, split, comment, encrypt the backup image, enableemail notifications, etc.
2. Schedule: six options provided: daily, weekly, monthly, event triggers,USB plug-in, Real time sync. Set it up to automatically backup Windows Server 2003 (R2),here is the details:
Daily/Weekly/Monthly: Backup your data based on daily, weekly,monthly to automatically perform to save your time.
Event Triggers: Trigger the backup task to according to thefollowing events: User logon, User logoff, System startup, System shutdown.
USBplug in: Once detecting the USB device of the task is plugged in, It willautomatically back up the data on the USB or backup local data to USB device.
Real-time Sync: Sync files immediately once they changed, please tryreal time filesync feature update your files to the latest.
3. Besides, set up Scheme to delete oldbackups to manage your hard drive space. 5 schemes provided: Full Backup Scheme,Incremental Backup Scheme, Differential Backup Scheme, Space Management Scheme, Other BackupScheme. Know more details about retention policy, please refer to backup scheme.
Wait for a few minutes, the cost time depends on the data size on the system partition. ClickFinish after the system image backup finished. Now, you could create a bootable media. Thenrestore the Windows Server 2003 system with the system image and the bootable media in theevent of system failure.
Besides, AOMEI Backupper Server has the professional features, clone Windowsoperating system to SSD for upgrading, restore system image to original computer ordissimilar hardware computer, backup your personal files with file backup, partitionbackup, even backup the Windows Server 2003 entire hard drive, etc.
Summing Up
Compared with Backup Utility and NTBackup, AOMEI Backupper is easier to operate to create asystem image backup in Windows Server 2003 (R2), 2008, 2012 (R2), 2016, 2019, and WindowsXP, Vista, 7, 8, 8.1, 10. And AOMEI Backupper provides you flexible ways to backup data. ForIT technicians, try AOMEI BackupperTechnician.
The Windows Task Scheduler is a useful tool for automating various tasks within the Windows operating system. It provides a simple graphical interface and is much easier to navigate than command prompt or Powershell. Though it does have some limitations when compared to the aforementioned options, there are still numerous actions that can be automated using the Task Scheduler.
One of the most useful tasks that can be automated, at least from my perspective as a Database Administrator, is the ability to perform automated file deletion. In the example outlined below, I will be creating a scheduled task to run daily which will delete files from a specified directory that are older than 90 days.
To provide a little background on this, the example I will be working with pertains to an automated SQL runtrace Agent Job that I have running on the server. The job runs daily and runs a continual trace logging any transactions that take longer than 3 seconds. As a result, a new file is added to the directory every day. Though each file is only around 11MB, over time this can begin to add up and deleting these files eventually becomes a necessity.
The steps outlined below will walk you through the steps of creating a new scheduled task which will call the ForFiles
command to handle automatically deleting the older files.
The first step is to log into the server containing the directory from which you want to automate file deletion.
Once logged in, launch the TaskScheduler.
Schedule Server 2003 Backup Batch File Windows 10
Once the Task Scheduler window appears, right-click Task Scheduler Library and select New Folder. Though this step is not technically necessary, I find putting related tasks into their own folder provides better organization when searching for a particular task.
Schedule Batch File
In this example I will call the folder DBA.
Once the folder has been created you will see it listed under the default Microsoft folder. The next step is to right-click the newly created folder and select Create Task.
The Create Task window will open. On the General tab you’ll want to provide a Name for the task. Here you can also change the User assigned to run the task. In this example I am using my account but best practice would suggest using a proper service account which has sufficient permissions on the server.
You will also want to select the radio button next to Run whether user is logged on or not. This will make sure that the task will be called regardless of the the user’s connectivity to the server.
Next, click on the Triggers tab. This is where we will configure when the scheduler will run. Once on the Triggers tab click the New… button at the bottom of the window.
The New Trigger window will be displayed.
As seen in the screenshot below, I have configured this trigger to begin on a schedule and to run on a Daily basis at 7:00PM.
Once you have configured your trigger click OK.
You should now see your newly created trigger listed.
Next, click on the Actions tab and click New… at the bottom of the window.
The New Action window will be displayed. This is where you will call the ForFiles
script and configure the command line argument to delete the files. This is the most important step.
Make sure the Action being called is set to Start a program. This should be the default setting but if not, just select it from the drop-down.
Next enter ForFiles
into the Program/script text box.
The final step requires you to specify the argument that you want to pass to the ForFiles
script.
In this example I am passing the following argument:
/p 'C:DBASQLTrace' /s /d -90 /c 'cmd /c del @file'
Depending on your specific needs, you will need to change the directory being specified as well as the number of days back. The above argument will remove files older than 90 days from the C:DBASQLTrace folder.
Once you have configured the argument click OK.
You will now see the newly created action listed.
There are two additional tabs, Conditions and Settings. Though it is not necessary to change any of the default configuration options on these two tabs, they are worth reviewing. Depending on the scheduled task you are creating, some changes may be beneficial.
Though I rarely do anything with the Conditions tab, the Settings tab does have a couple options that I find to be useful. Though I am not selecting them for the purposes of this example, the highlighted options below can be useful depending on the task being scheduled. You can also instruct the Task Scheduler to self-delete if it has not been called for a particular number of days.
Once you have fully configured the task and any additional options click OK.
You will be prompted to enter the necessary credentials based on the account you selected to run the task when configuring the General tab. Once the credentials are entered you will see the newly created scheduled task listed under the task library folder you created.
If you wish to manually execute the task to test and make sure it performs as intended you can do this by right-clicking the task and select Run.