Running the Backup via a Batch file

First you need to create your batch file using a text editor and add the following:

Syntax
cd D:\Astun\Tools\DatabaseBackup
C:\Python25\python.exe database_backup.py -f config.ini

Note: Call the config file with a relative path rather than an absolute path.

If your backup fails with errors about client encoding then you may need to set the PGCLIENTENCODING environment variable in the top line of your batch file. For example, to set the encoding to LATIN1, add the following line at the top:

Set encoding
set PGCLENTENCODING=LATIN1

 

Save the file with a .bat extension e.g. "ishare_backup.bat". We would suggest that you store this batch file in the Astun DatabaseBackup folder for simplicity e.g. D:\Astun\Tools\DatabaseBackup

Now you can create a Workflow Task in iShare Studio to run the batch file.

Right click on the Unassigned tasks node under the Jobs node and select New Task.

Select the Program radio button and click OK.

Name

Enter a unique name for your task e.g. iShare Backup

Details

Program

Use the browse button to select the batch file that you have just created.

 

Click Save to save your new Task.

If you wish to actually run the task interactively right click on the task entry and select Run Task iShare Backup or whatever you named the task.

Schedule the Backup

To schedule this to run repeatedly, create a Workflow Job that runs this task and set the Job scheduler. You must ensure that the scheduled task user has permission to write into the local and remote backup locations.