The read-baseline
task reads the baseline records from a Record Store instance.
The syntax for this task is:
recordstore-cmd read-baseline -a RecordStoreInstanceName [-c] [-f FileName.xml] [-g GenId] [-h HostName] [-l true|false] [-p PortNumber] [-n NumRecs] [-x id]
where:
-a (or --instanceName) specifies the name of a Record Store instance. Required.
-c (or --count) that only prints the record count from the read. Optional.
-f (or --file) specifies the pathname of the file to which the Endeca records will be output. The filename extension determines the format of the output file. Valid extensions for the file are
.xml
(for an XML format) and.bin
(for a binary format); the file can also have an additional, optional.gz
extension if it is a compressed file. If unspecified, the record are written to the console. Optional.-g (or --generation) specifies the ID of the generation from which the records are read. If omitted, records from the last-committed generation are read. Optional.
-h (or --host) specifies the host where the CAS Service is running. If the flag is omitted, the default is the value of the
com.endeca.itl.cas.server.host
property incommandline.properties
. If the property is not set, the value then defaults to localhost. Optional.-l (or --isPortSsl) specifies whether to communicate with the service using an HTTPS connection. A value of true uses HTTPS and treats the
com.endeca.itl.cas.server.port
property as an SSL port. A value of false uses HTTP and treatscom.endeca.itl.cas.server.port
as a non-SSL port. Specify false if you enabled redirects from a non-SSL port to an SSL port. Optional.-p (or --port) specifies the port of the CAS Service. If the flag is omitted, the default is the value of the
com.endeca.itl.cas.server.port
property incommandline.properties
. If the property is not set, the value then defaults to 8500. Optional.-n (or --firstN) specifies that only the first numRecs records of the baseline will be read. If omitted, all records are read. Optional.
-x (or --transaction) specifies the active transaction ID to use. If you use this option, you must follow it with a
commit-transaction
task to commit the read operation. If this flag is omitted, the operation is done in auto-commit mode. Optional.
Example 26. Examples of reading baselines
The first example reads the first 50 baseline records (from the last-committed generation) and outputs them to a file:
recordstore-cmd read-baseline -a RS1 -n 50 -f c:\recdata\basedata.xml
The output is written in an XML format to the basedata.xml
file located in the C:\recdata
directory.
The second example prints the number of records in the baseline:
recordstore-cmd read-baseline -a RS1 -c -g 2
The command prints out the number of records in generation 2 of the Record Store.