Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctredirect - IFIL Update Utility for Redirected Filenames

Updates IFIL Filenames for redirection to alternate locations.

The Redirect feature is used to allow a file originating in one directory structure to be repositioned into another directory location following autorecovery, dynamic dump restore, or replication. As a result, if the IFIL resource of the file contained a path, this path would be incorrect after the file was redirected to the new location. To support copying c-tree files from one directory location to another (on the same system or on a different system) and accessing them in their new location, it is necessary to update any filename paths in a c-tree data file's IFIL resource.

ctredirect is used to update the file names contained in the IFIL resource of the specified files. ctredirect accepts as command-line options the name of a text file containing the list of files whose IFIL resources are to be updated and the name of a text file containing the filename redirection rules.

A comment may be placed in the redirection rules file by starting the line with a semi-colon (;).

Note: The rules must match the path in the IFIL resource, which may differ from the path used to open the file. The rules must precisely match the path in the IFIL resource, which may differ from the path used to open the file, therefore you may not use wild cards.

Operational Model:

  • Standalone

Usage

ctredirect -f <filenamelist> -r <redirectlist> -n <sect>

Where:

  • -f <filenamelist> - Name of a text file containing the names of c-tree data files whose IFIL resources are to be updated.
  • -r <redirectlist> - Name of a text file containing the redirection rules. The rules are in the format: <current path> <new path> (see the example below).
  • -n <sect> - Node sector size. The default is 64, corresponding to the server default PAGE_SIZE of 8192.

Example

Consider the current directory contains the data files customer.dat and inventory.dat, and their IFIL resources specify the path /export/home/users/marketing/data for the data and index files.

The current directory contains the file myfiles.txt listing the following file names:

customer.dat

inventory.dat

The current directory also contains the file myrules.txt containing the following redirection rules:

/export/home/users/marketing/data /export/home2/users/support/data

ctredirect is then called to change the paths in the IFIL resource of these two data files:

./ctredirect -f myfiles.txt -r myrules.txt

Updating the file paths in the IFIL resources of the specified files...

[ OK ] customer.dat

[ OK ] inventory.dat

Successfully changed IFIL resource for all specified files

TOCIndex