Tomorrow I’m leaving on a well-deserved vacation. While I’m gone someone will cover for me and handle my job duties, one of which involves changing the backup tapes on the servers and erasing them. I decided to make this job easier for my co-workers by writing an AutoIt script that actually moves the moves the mouse itself and clicks the options to automate this tedious procedure.
If you’re running Symantec Backup Exec for Windows Servers 12.5 and have your desktop resolution set at 1280 x 1024, this script should work for you as well.

sleep (2000)
winactivate (“Symantec Backup Exec”)

; clear the alert windows
mousemove (879, 296,100)
for $g = 1 to 10
Mouseclick (“left”)
sleep (2000)

; move the mouse to Devices
Mousemove (571, 95,100)
MouseClick (“left”)

; scroll to top of devices
mousemove (181, 115,100)
Mousedown (“left”)
sleep (10000)
Mouseup (“left”)

; Inventory the Tape
sleep (1000)
Mousemove (54, 362,100)
MouseClick (“Left”)
Mousemove (818, 748,100)
MouseClick (“Left”)
Mousemove (639, 532,100)
MouseClick (“Left”)
Sleep (5000)

;Wait for Erase options to be active
$checksum = PixelChecksum(20, 378, 140, 424)
While $checksum = PixelChecksum(20, 378, 140, 424)

;Erase the Tape
Mousemove (70, 411,100)
MouseClick (“Left”)
Mousemove (642, 563,100)
MouseClick (“Left”)
Mousemove (642, 549,100)
MouseClick (“Left”)
Mousemove (818, 749,100)
MouseClick (“Left”)
Mousemove (637, 532,100)
MouseClick (“Left”)
Mousemove (326, 95,100)
MouseClick (“Left”)

When this script is run, it starts by clearing all the alert windows generated during the backup. These alert windows display the status of the backup and any errors that were encountered. It clicks OK to close these windows 10 times, in case one server has more windows to clear.
Then the script moves the mouse to the Devices menu and scrolls to the top of its menu in case it’s not at the top already. Next it clicks the Inventory menu item and clicks OK on the windows that open to confirm you are about to run the Inventory on the tape in the drive.
Here the script will pause until the options to erase the tape are active. It will then move the mouse to click the option to do a full erase, click OK on the windows that open to submit the erase job and finish by clicking on the Job Monitor so you can verify that the erase tape operation is running.
This script has been tested and it works fine on all three of our servers. I hope it serves you well.

Tape backups failing due to device not being found.

At work we have 3 servers that run tape backups every night using Symantec’s Backup Exec for Windows Servers. Lately I noticed that the backups have been failing on one of the servers. Here’s what I saw in the job log.

Job name : Backup – Monday through Friday
Job type : Backup
Job status : Failed
Job log : D:\Symantec\Backup Exec\NT\Data\BEX_LRECDOPS-DS1_04552.xml
Server name : LRECDOPS-DS1
Selection list name : Backup – Monday through Friday
Device name : DELL 1
Target name : All Devices (LRECDOPS-DS1)
Media set name : Media Set 1
Error category : Resource Errors
Error : e000fe1f – The device cannot be found.
For additional information regarding this error refer to link V-79-57344-65055

The error message about the device not being found seemed a little odd. I did some research on this problem and found out that the way to fix it was to right-click on the backup job and select “Edit Selection List”. The following window appears.

Just for the heck of it I checked “System State” on the selection list, which wasn’t selected previously. Even checking something on the list and then unchecking it should be enough to update the selection list. Once the list got updated, the backups ran with no further problems.