Preprocessing and postprocessing scripts and attributes
Preprocessing and postprocessing scripts are user-written shell scripts that you can run from
Avamar Administrator when you perform backup and restore operations. Specify preprocessing or postprocessing scripts and attributes in the
Backup Command Line Options dialog box or the
Restore Command Line Options dialog box.
To specify preprocessing or postprocessing scripts, select
Show Advanced Options in either of the two dialog boxes.
From the
Backup Command Line Options or
Restore Command Line Options dialog box, select
Show Advanced Options.
Click
More. The
Enter Attribute and
Enter Attribute Value fields appear.
The following table describes the attributes that you specify in the
Enter Attribute and
Enter Attributes Value fields.
Table 1. Preprocessing and postprocessing attributesThe following table provides the preprocessing and postprocessing attributes.
Attribute
Description
run_at_start=script_name
Specifies a script to run before a backup or restore operation. The user interface includes the
Run user-defined script at beginning of backup and
Run user-defined script at beginning of restore fields for this attribute.
run_at_start_clause=flags
Specifies flags to use with the
run_at_start script.
run_at_end=script_name
Specifies a script to run after a backup or restore operation. The user interface includes the
Run user-defined script at end of backup and
Run user-defined script at end of restore fields for this attribute.
run_at_end_clause=flags
Specifies flags to use with the
run_at_end script.
run_before_database=script_name
Specifies a script to run before a database backup or restore operation. When you specify multiple targets, the script runs for each database operation.
run_before_database_clause=flags
Specifies flags to use with the
run_before_database script.
run_after_database=script_name
Specifies a script to run after a database backup or restore operation. When you specify multiple targets, the script runs for each database operation.
run_after_database_clause=flags
Specifies flags to use with the
run_after_database script.
The following table describes flags that you specify for
run_at_start_clause,
run_at_end_clause,
run_before_database_clause, and
run_after_database_clause attributes.
Table 2. Attribute flagsThe following table describes flags that you specify for
run_at_start_clause,
run_at_end_clause,
run_before_database_clause, and
run_after_database_clause attributes.
Flag
Description
Usage
Default value
desc
Specifies a description for the script.
desc=text string
Type of script being executed.
env
Specifies an environment variable to use.
env=variable_name=value
None
exit_on_error
Set to
true to exit the process if the preprocessing or postprocessing script fails.
exit_on_error=true
False
skip_on_error
Set to
true to skip the next backup or restore component. The
skip_on_error flag clause is valid only with the
run_before_database
attribute.
skip_on_error=true
False
use_cscript (Windows only)
Set to
true to run the script with Microsoft
cscript.exe.
use_cscript=true
False
use_cscript_raw (Windows only)
Set to
true to run the script with Microsoft
cscript.exe/nologo.
use_cscript_raw=true
False
timeout_seconds
Specifies the number of seconds a script has to complete before the plug-in considers the script as failed. The plug-in then terminates the script.
timeout_seconds=num
1 hour (60 * 60 seconds)
create_stdout_pipe
Creates a
stdout pipe for the script and sends output to the
avoracle log file.
create_stdout_pipe=true
True
create_stderr_pipe
Creates a
stderr pipe for the script and sends output to the
avoracle log file.
create_stderr_pipe=true
True
stringlist_args
Set to
false (default value) to split the specified argument’s string into separate arguments. Set to
true to use each argument’s string as a separate argument to the script.
Example of stringlist_args=false: [avoracle]run_at_start=script.bat First Second Third
The plug-in passes First, Second, and Third as three command line parameters to script.bat.
Example of stringlist_args=true: [avoracle]run_at_start=script.bat First Second Third
The plug-in considers the script as a single file name. The arguments are not split. To pass arguments the correct way, use commas: