logo

MOUNT10 Linux Client Script Plugin Setup using Command Line

Background

The MOUNT10 Script Plugin is supported under Linux.

Whilst there is a dialog for configuring the Script Plugin settings in a Linux with-GUI environment, command line is needed if no GUI is available.

Installation

If the Script Plugin is required, it must be manually installed:

  1. Install a Server Edition client to a Windows machine
  2. Run the Plugin Installer, selecting the Script plugin
    • When completed, you will find the script_plugin.jar file in the installation path under the “scripts” subdirectory
  3. Copy the script_plugin.jar file to your linux machine into the /usr/share/a5backup/plugins directory
  4. Restart the backup service using the command “service a5backupd restart” as a superuser

Configuring using the GUI

In a GUI environment, the Script Plugin will now be available in the menu under Tools->Plugins->Scripting.

Configuring without a GUI

The easiest way to configure the script plugin without a GUI is to copy the relevant options from the a5backup.properties file from a machine with the GUI installed, but it is possible to edit the parameters by hand using these steps:

  1. Stop the backup service using “service a5backupd stop”
  2. Open the /usr/share/a5backup/a5backup.properties file in a text editor as superuser. The following options can be edited:
    • scriptplugin.numscripts=n (n is the number of scripts)
      • So if you have two scripts, the file will read scriptplugin.numscripts=2 and contain entries for both scriptplugin.script.1 and scriptplugin.script.2
    • scriptplugin.script.x=<parameters> (x is the index of the script)
      • See the table below for possible <parameters> values.
  3. When the editing is complete, save the a5backup.properties file
  4. Restart the service using “service a5backupd start”. The script will then attempt to run as configured.

NB: It is strongly recommended to thoroughly test any scripting before leaving the backup to run unattended on its schedule.

Parameters

The list of parameters is comma separated and that each “=” after the first needs to be written as “\=”. The screenshot above shows the following options set in the a5backup.properties file:

scriptplugin.script.1=name\=TestScript1,binary\=hello world,params\=-1234&,workDir\=/root,eventID\=1,waitFor\=true,abortNotZero\=true,enabled\=true

scriptplugin.numscripts=1

GUI Setting Parameter equivalent
Script Name name\=Name
Run Script on Event eventID\= (see lookup table below)
Execute binary\={Path to script}
Execute In Folder workdir\={Path to folder}
Parameters params\={Any additional parameters}
Wait for process to complete waitFor\=true|false
Abort backup if exit code is not 0 abortNotZero\=true|false
Enable/Disable checkbox (next to script name) enabled\=true|false

Event IDs:

 Run Script On Event Description  eventID
Backup start 1
Compression and patching 15
Backup data created 2
Connection open 11
Transfer start 5
Transfer end 6
Connection closed 12
Backup end 0
Restore start 16
Restore transfer starts 17
Restore transfer ends 18
Restore end 19
0 found this helpful