istool syntax
Posted: Tue Jul 07, 2009 10:03 am
In an earlier post I referred to a comprehensive 8.1 patch for IS Manager and istool. The good news is that it has resolved several of the issues that were preventing both tools from working properly.
However, the syntax on the istool command can be a bit tricky to figure out the first time because it uses a -datastage (-ds) option that has sub-options that must be passed properly. Because of this, I'm posting a few working examples of the istool command in operation. I'm just going to show using the "export" option since that is the most frequently used option and it will give you an idea of how the options work.
Note: In the examples below, I've updated it to show a three-tier architecture with a separate services tier (serviceshost) and an engine tier (enginehost). It can be a bit picky as to matching the engine host syntax (might have fully qualified .com name) and also is in upper case. If you are having issues matching the syntax, login to the InfoSphere Information Server Manager (the GUI front-end for istool) and use same syntax it displays for hostname after you connect.
First - here's some of the "help" options to show that there is help for each of the main istool operations (again - just showing export).
Now some working examples of an export. Note that I've "sanitized" the commands and output a bit to remove sensitive info. I'm also using the "-preview" option in a few cases that just shows what would be exported without actually doing the export. Also note that the suffixes are internal (ie: not part of the user supplied item names) - here are the ones I'm aware of:
In the second example I use the "-incdep" option that includes dependent jobs and routines for that category.
In the final example I show how you'd backup all the jobs in a project including any routines they call:
Hopefully that's helpful and keeps you from wasting time trying to figure out the syntax on the command!
[Edit - Andy Sorrell 04/29/2014]
Adding some stuff I keep getting asked about...
Below syntax shows backing up EVERYTHING in a project (all routines, jobs, etc.). Also shows syntax to use authfile with encrypted password. Due to poor design, you must still specify domain on command line, even with an .authfile (yes I've complained to IBM about it!).
The contents of the .authfile would be something like this:
user=dsadm
password={iisenc}encryption_text_here==
domain=servicehost:9080
server=enginehost
However, the syntax on the istool command can be a bit tricky to figure out the first time because it uses a -datastage (-ds) option that has sub-options that must be passed properly. Because of this, I'm posting a few working examples of the istool command in operation. I'm just going to show using the "export" option since that is the most frequently used option and it will give you an idea of how the options work.
Note: In the examples below, I've updated it to show a three-tier architecture with a separate services tier (serviceshost) and an engine tier (enginehost). It can be a bit picky as to matching the engine host syntax (might have fully qualified .com name) and also is in upper case. If you are having issues matching the syntax, login to the InfoSphere Information Server Manager (the GUI front-end for istool) and use same syntax it displays for hostname after you connect.
First - here's some of the "help" options to show that there is help for each of the main istool operations (again - just showing export).
Code: Select all
$ pwd
/opt/IBM/InformationServer/Clients/istools/cli
$ ./istool -h
istool Command [ Command_Options ] [ Options ]
Possible values for: Command
- : Provide usage information.
help : Provide command-line help information.
: Istool Console.
export : Export to a file.
import : Import from a file.
build package : Build a Deployment Package.
deploy package : Deploy a Deployment Package.
To list Command_Options, enter: istool Command -help
Possible values for: Options
Long Name: Short Name: Description:
-help , -h : print command usage
-verbose , -v : display progress
-silent , -s : silence command output
-script , -script : file to read commands from.
Exit codes:
0 - Success
1 - Warning
2 - Partial failure
3 - Error reading from console
4 - Invalid command history index
5 - Error reading from script file
11 - Invalid command syntax
$./istool export -help
istool export [ Options ]
Possible values for: Options
Long Name: Short Name: Description:
-help , -h : print command usage
-domain , -dom : Name of Information Server domain
-username , -u : Name of user account on Information Server domain
-password , -p : Password for Information Server account
-verbose , -v : display progress
-silent , -s : silence command output
-archive , -ar : Archive file
-preview , -pre : Preview export task without executing
-abortIfError , -abort : Abort task on N errors
-updatearchive , -up : Update any existing Archive file
-datastage , -ds : DataStage Assets
Options for: -datastage
-includedependent , -incdep : Include dependent items
-nodesign , -nodes : Exclude design items
-includeexecutable , -incexec : Include executable items
-base , -base : Prefix for Paths
DataStage item paths
Exit codes:
0 - Success
1 - Warning
2 - Partial failure
3 - Export failed
4 - Export preview failed
5 - Invalid archive file
10 - Failed to connect to Information Server domain
11 - Invalid command syntax
- qjb - Job Sequence
sjb - Server Job
pjb - Parallel Job
srt - Server routine
tbd - Table Definition
tfm - Transform
Code: Select all
$ ./istool export -domain serviceshost:9080 -u dsadm -p password -ar test.isx -pre -ds '-base="ENGINEHOST/Dev_Project" Jobs/Batch/*.*'
Beginning Export Preview
[1/2] ENGINEHOST/Dev_AdHoc/Jobs/Batch/SeqIBIInvoices.qjb
[2/2] ENGINEHOST/Dev_AdHoc/Jobs/Batch/SeqIBIOrders.qjb
Previewed 2 assets
Code: Select all
$ ./istool export -domain serviceshost:9080 -u dsadm -p password -ar test.isx -pre -ds '-incdep -base="ENGINEHOST/Dev_Project" Jobs/Batch/*.*'
Beginning Export Preview
[1/9] ENGINEHOST/Dev_Project/Jobs/Batch/SeqIBIInvoices.qjb
[2/9] ENGINEHOST/Dev_Project/Jobs/Batch/SeqIBIOrders.qjb
[3/9] ENGINEHOST/Dev_Project/Jobs/Control/tgtparmFileName.sjb
[4/9] ENGINEHOST/Dev_Project/Jobs/Control/tgtparmSelectDate.sjb
[5/9] ENGINEHOST/Dev_Project/Jobs/IBI Sales & Invoices/tgtinsIBIInvoices.sjb
[6/9] ENGINEHOST/Dev_Project/Jobs/IBI Sales & Invoices/tgtinsIBISales.sjb
[7/9] ENGINEHOST/Dev_Project/Jobs/IBI Sales & Invoices/tgtinsIBISalesVoids.sjb
[8/9] ENGINEHOST/Dev_Project/Routines/Job Control/CreateFileFromDate.srt
[9/9] ENGINEHOST/Dev_Project/Routines/Job Control/SetDateFromInput.srt
Previewed 9 assets
Code: Select all
$ ./istool export -domain serviceshost:9080 -u dsadm -p password -ar test.isx -ds '-incdep -base="ENGINEHOST/Dev_Project" Jobs/*/*.*'
Beginning Export
[1/11] ENGINEHOST/Dev_Project/Jobs/Batch/SeqIBIInvoices.qjb
[2/11] ENGINEHOST/Dev_Project/Jobs/Batch/SeqIBIOrders.qjb
[3/11] ENGINEHOST/Dev_Project/Jobs/Control/tgtparmFileName.sjb
[4/11] ENGINEHOST/Dev_Project/Jobs/Control/tgtparmSelectDate.sjb
[5/11] ENGINEHOST/Dev_Project/Jobs/IBI Sales & Invoices/tgtinsIBIInvoices.sjb
[6/11] ENGINEHOST/Dev_Project/Jobs/IBI Sales & Invoices/tgtinsIBISales.sjb
[7/11] ENGINEHOST/Dev_Project/Jobs/IBI Sales & Invoices/tgtinsIBISalesVoids.sjb
[8/11] ENGINEHOST/Dev_Project/Jobs/XArchive/SeqIBIInvoices_ParameterChg_20070404.qjb
[9/11] ENGINEHOST/Dev_Project/Jobs/XArchive/SeqIBIOrders_ParameterChg_20070404.qjb
[10/11] ENGINEHOST/Dev_Project/Routines/Job Control/CreateFileFromDate.srt
[11/11] ENGINEHOST/Dev_Project/Routines/Job Control/SetDateFromInput.srt
Elapsed time: 00:00:18
Exported 11 assets
$ ls -l test.isx
-rw-r--r-- 1 dsadm dstage 115147 Jul 6 13:53 test.isx
[Edit - Andy Sorrell 04/29/2014]
Adding some stuff I keep getting asked about...
Below syntax shows backing up EVERYTHING in a project (all routines, jobs, etc.). Also shows syntax to use authfile with encrypted password. Due to poor design, you must still specify domain on command line, even with an .authfile (yes I've complained to IBM about it!).
Code: Select all
./istool export -domain serviceshost:9080 -authfile /home/dsadm/.authfile -silent -archive /backups/projectname.isx -datastage "-incdep -base=ENGINEHOST/Dev_Project */*.*"
user=dsadm
password={iisenc}encryption_text_here==
domain=servicehost:9080
server=enginehost