You are here: Installation > Setting Up SAP from the Command Line

Setting Up SAP from the Command Line

You can set up the SAP Recovery Kit through the use of the command line. 

Creating an SAP Resource from the Command Line

From the Primary Server, execute the following command:

$LKROOT/lkadm/subsys/appsuite/sap/bin/create <primary sys> <tag> <SAP SID> <SAP Instance> <switchback type> <IP Tag> <Protection Level> <Recovery Level> <Additional SAP Dependents>

Example:
$LKROOT/lkadm/subsys/appsuite/sap/bin/create liono SAP-STC_SCS00 STC SCS00 intelligent ip-sap10 Full Full none

Notes:

Extending the SAP Resource from the Command Line

Extending the SAP Resource copies an existing hierarchy from one server and creates a similar hierarchy on another LifeKeeper server. To extend your resource via the command line, execute the following command: 

system "$LKROOT/lkadm/bin/extmgrDoExtend.pl -p 1 -f, \"$tag\" \"$backupnode\"
\"$priority\" \"$switchback\" \\\"$sapbundle\\\"";

Example: Using a simple script for usability and ease.

#!/etc/default/LifeKeeper-perl
require "/etc/default/LifeKeeper.pl";
my $lkroot="$ENV{LKROOT}";
my $tag="SAP";
my $backupnode="snarf";
my $switchback="INTELLIGENT";
my $priority=10;
$sapbundle = "\"$tag\",\"$tag\"";
system "$lkroot/lkadm/bin/extmgrDoExtend.pl -p 1 -f, \"$tag\" \"$backupnode\"
\"$priority\" \"$switchback\" \\\"$sapbundle\\\"";

© 2012 SIOS Technology Corp., the industry's leading provider of business continuity solutions, data replication for continuous data protection.