About running command files during a backup

Article:HOWTO13634  |  Created: 2008-01-05  |  Updated: 2013-10-17  |  Article URL http://www.symantec.com/docs/HOWTO13634
Article Type
How To


Environment


About running command files during a backup

You can use command files (.exe programs with no user interface, .cmd, .bat) and configure them to run during all phases of a backup. Command files can be used to integrate with any backup routines that you may be running on the client computer. Or, command files can be used to integrate with the applications that may use a drive on the client computer. These command files can run in the following three different stages during the creation of a recovery point:

  • Before data capture

  • After data capture

  • After recovery point creation

You can also specify the amount of time (in seconds) that a command file should be allowed to run.

The most common use for running command files is to stop and restart non-VSS-aware databases (such as Windows 2000) that you want to back up with Backup Exec System Recovery.

About backing up non-VSS-aware databases

Note:
Any command files that you specify in the Command Files dialog of the wizard are copied to the Backup Exec System Recovery Manager server (the default path is \Program Files\Symantec\Backup Exec System Recovery\Manager\Services\tomcat\webapps\axis\depot\commands\commandFiles.) When you assign the backup job to client computers, any command files you specified are also assigned to the backup. Be sure you have the necessary rights to run each command file.

To use a Visual Basic script file (.vbs) during a backup, you can create a batch file (.bat) that runs the script. For example, you can create a batch file called stop.bat that contains the following syntax:

Cscript script_filename.vbs

Make sure that Cscript precedes the Visual Basic script file name.

Warning:
The command files that you install and use (such as an .exe) cannot depend on any user interaction. The files also cannot have a visible user interface while they are running during a backup. You should test all of the command files you intend to use, outside of Backup Exec System Recovery, before using them during a backup.

When the backup begins, the command file runs during the specified stage. If an error occurs while a command file is running, or the command file does not finish in the time you specified (regardless of the stage), the entire backup is stopped. The command file is ended (if necessary), and the error information is logged and displayed.

The following table describes the three stages of recovery point creation.

Table: Recovery point creation stages

Stage

Description

Before data capture

This stage occurs after a backup has started and before the recovery point is created. When you run a command during this stage, it lets you prepare for the recovery point creation process. It stops (or notifies) any open applications that the drive uses.

Note:
If you use this stage option, be sure that the command file has an error recovery mechanism that is built into it. If the computer has one or more services that must be stopped at this stage (such as stopping a non-VSS aware database or a resource-intensive application), and the command file does not contain any form of error recovery, one or more of the stopped services may not be restarted. An error in the command file can cause the entire recovery point creation process to end immediately; no other command files can run.

After data capture

This stage occurs after the "virtual disk snapshot" is created. When you run a command during this stage, you can allow services to safely resume normal activity on the drive while continuing the recovery point creation process.

Because the virtual disk snapshot takes only a few seconds to create, the database is in the backup state momentarily. It results in a minimal number of created log files.

After recovery point creation

This stage occurs after the actual recovery point file is created. When you run a command during this stage, it lets you act on the recovery point, itself, by copying it to an offline location.



Legacy ID



313731


Article URL http://www.symantec.com/docs/HOWTO13634


Terms of use for this information are found in Legal Notices