webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Periodical Data backup 

Tue January 08, 2019 05:00 PM

Author: Raghu, Sreesaran (srag@softwareag.com)

Supported Versions: 10.0 and above

Introduction

The purpose of this tutorial is to list down the detailed steps of Configuring Task Scheduler for a periodical data backup.

Details

Periodically Backup Data in Windows

This page will describe the detailed steps on how to periodically backup in various environments. 

Script File Location : <InstallationLocation>\IntegrationServer\instances\default\packages\WmAPIGateway\cli\bin

Step 1: Open Task Manager

Click on Start and under search, type in Task and click open Task Scheduler.

Step 2: Create Basic Task

Select Create Basic Task from the Action pane on the right of the window.

Step 4: Enter Scheduler Job Name

Under Create Basic Task, type in the Scheduler Job Name Example:- BackupJob and click Next.

Step 5: Select Time Period

Select the period you want back(preferable option Daily), Weekly or Monthly based on the Requirement.

Step 6: Select Type as Start Program

Step 7: Select Time Period

Enter the start date of job and Enter the Time at which backups needs to occur (preferably at a period when the no of invocations are low). 

Step 8: Enter Scheduler Configuration

Enter the value for Program/script as cmd

Enter the value for Add arguments as /c "apigatewayUtil.bat create backup -sync false"  

Enter the value for start in as <InstallDir>\IntegrationServer\instances\default\packages\WmAPIGatway\cli\bin

Periodically Backup Data in Linux

Step 1: create test script file Example : test.sh

1
2
cd <IntallationLocation>/IntegrationServer/instances/default/packages/WmAPIGateway/cli/bin/
sh apigatewayUtil.sh create backup
Note: If the error "/bin/sh: <fileLocation>/<filename>.sh: Permission denied" is thrown, then file doesnot have sufficient permission to run chmod +x <shellscript>. For example chmod +x test.sh

Step 2: configure crontab

1
2
3
4
5
6
7
8
9
10
11
type command   -> crontab -e
add the entry  -> 51 07 * * * <FileLocation>/<filename>.sh
                   
                  * * * * * command to be executed
                  - - - - -
                  | | | | |
                  | | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
                  | | | ------- Month (1 - 12)
                  | | --------- Day of month (1 - 31)
                  | ----------- Hour (0 - 23)
                  ------------- Minute (0 - 59)
 

Periodically Backup Data Using Jenkins in Linux & Windows

Step 1 : Create a New Job

Create a new Job by clicking new item and select the job type as Select the Freestyle Project

Step 2:  Enter Job Name

Enter the Jenkins Job name as "API Gateway Backup" or any other preferable name 

Step 3: Select Job Type

Select the execute Windows Batch Command in case of Windows (or) Select the execute Shell Script in case of Linux 

Step 4: Configure the Time period

Select the build periodically and Enter the value  "H 2 * * 1-7" (Daily backup at 2 am)

Step 5: Enter command

<Windows command> : <InstallationLocation>\apigatewayUtil.bat create backup 

Step 6: Save the job


#wiki
#API-Gateway
#webMethods
#API-Management

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads