Home Print  

User Plugins For Backups

Overview

supports creating custom plugins for backups. These plugins are useful where before and after a backup is done you need to run a command. For example, the command may interface with an application and create some files/folders which need to be backed up by .

Configure User Plugin

The user plugin is configured by creating an XML file. The following describes with an example how the XML file is created and how you can integrate the plug-in with .

Step 1: Creating the plugin XML file

The plugin XML file (say, TestPlugin.sgpl) has to be created under the "plugins" directory under the Installation Directory. Note that you can create any number of plugins and each plugin file has to be in a different name. The plugin created here will automatically appear in the Backup Configuration Tree in the "Add Backup Schedule" page.

Step 2: Editing the plugin XML file

The following plugin XML file is used to illustrate how a user plugin is created in .

<StoreGrid>
<SGPlugins>
<Plugin Name="TestPlugin" IsValid="1">
<BeforeRun Command="D:\joe\work\zipSource.bat" WorkingDir="D:\joe\Backup" TimeOut="180000"/>
<BeforeRun Command="D:\joe\work\zipData.bat" WorkingDir="D:\joe\Backup" TimeOut="180000"/>
<AfterRun Command="D:\joe\work\cleanSourceBk.bat" WorkingDir="D:\joe\Backup" TimeOut="180000"/>
<AfterRun Command="D:\joe\work\cleanDataBk.bat" WorkingDir="D:\joe\Backup" TimeOut="180000"/>
<BackupPath>
<Path Name="D:\joe\Backup\workSource.zip"/>
<Path Name="D:\joe\Backup\workData.zip"/>
<Path Name="D:\joe\Backup\MiscFiles"/>
</BackupPath>
</Plugin>
</SGPlugins>
</StoreGrid>

Plugin Tag : This tag is used to configure the following attributes for the plugin

    Name - This is used to give a name for the plugin. This name will appear in the backup configuration tree in the "Add Backup Schedule" page.

    IsValid - A value of 1 means the plugin is active and will be displayed in the tree. A value of zero means the plugin is inactive and will not be displayed in the tree.

BeforeRun Tag: This tag is used to configure the command that needs to be run before runs the backup schedule for this plugin. You can run multiple commands by giving each command under a BeforeRun XML tag.

    Command - The command that needs to be run is given here. In the above example the batch files zipSource.bat and zipData.bat are run.

    WorkingDir - This is the directory from which the command has to be run.

    TimeOut - will timeout the command if the command does not finish within this time. This timeout value in milliseconds. "-1" denotes infinite timeout value.

AfterRun Tag: This tag is used to configure the command that needs to be run after finishes the backup schedule for this plugin. You can run multiple commands by giving each command under a AfterRun XML tag.

    Command - The command that needs to be run is given here. In the above example the batch files cleanSourceBk.bat and cleanDataBk.bat are run.

    WorkingDir - This is the directory from which the command has to be run.

    TimeOut - will timeout the command if the command does not finish within this time. This timeout value in milliseconds. "-1" denotes infinite timeout value.

BackupPath Tag: This is the list of files and folders that needs to be backed by after running the BeforeRun commands and before running the AfterRun commands. In the above example, will backup the files "D:\joe\Backup\workSource.zip", "D:\joe\Backup\workData.zip", and the folder "D:\joe\Backup\MiscFiles".

Configuring The Plugin Backup

Once the XML is created in the plugins directory, go to the Add Backup Schedule page in the webconsole. You will notice that the plugin name is displayed in the "Files/Folder" tree. You can select the plugin name in the tree and configure a backup schedule.

Troubleshooting Tips

Limitations

Print  
Technical support-