export_recovery

DESCRIPTION

Recovers and restores exported objects to your database under certain conditions. Occasionally, when you export an object and transfer ownership the object may not be successfully imported at the destination site. This places the object in an undefined state where no one has ownership. The preferred method of correcting this situation is to have the destination site complete the import/export transaction by importing the object into the database from the importing site’s IMAN_transfer_area (using interactive object import).

However, if this is not possible, the export_recovery utility is used to restore the object to the exporting database from the exporting site’s IMAN_transfer area using the min or full mode (effectively canceling the export/transfer ownership transaction). If no data is available at either site, recovery can be attempted by running the automode at the exporting site that was the last known owning site.

SYNTAX

$IMAN_ROOT/bin/
export_recovery [–u=user –p=password –g=group] –mode={ full | min | auto | auto_noexport | find } { [–item_id=item-id-to-restore] | [–folder=folder-name] | [–filename=file-name] } [–dir=directory] [–report=report-file] [–remote_site=last-transfer-site] [–include_bom] [–new_owning_site=desired-owning-site-for-auto_noexport] [–exclude=relation-type1 –exclude=relation-type2 ...] [–include=relation-type3 –include=relation-type4 ...] [–ignore_am_rules] [–h]

ARGUMENTS

–u
Specifies the user ID.

This is generally infodba or another user with administration privileges. If this argument is used without a value, the operating system user name is used.

–p
Specifies the password.

If used without a value, the system assumes a null value.

If this argument is not used, the system assumes the user-id value to be the password.

–g
Specifies the group associated with the user.

If used without a value, the user's default group is assumed.

–mode
Specifies the basic mode in which the utility will operate. The value of this argument can be one of the following:
full
Recovers objects from the export metafile, imports them into your database and restores ownership to your site.

min
Restores ownership to your site without reimporting data from the metafile. Only valid if the metafile was generated with transfer of ownership.

auto
Restores ownership on the specified item without reimporting. Only valid if the –itemid and –remote_site options are specified.

find
Searches for items with inconsistent site ownership and generates a report.

auto_noexport
Changes the owning site of specified objects to the new site. Only valid with the –new_owning_site option. Use only as a last resort if the –auto option fails to restore full site ownership.


–dir
Defines the path of the directory containing the exported metafile and the data files. Required only with the –mode=full and –mode=min options.

–item_id
Specifies the ID of the item to process. Wildcards are allowed.

–folder
Defines the name of the Teamcenter Engineering folder containing the list of items to process.

–filename
Defines the full path of the file that contains the list of items to process.

–remote_site
Defines the last site for which a transfer of ownership was attempted. This argument is only valid with the –auto option.

–h
Displays help for the utility.

–report
Specifies the full path of the report file. Valid only with –find mode.

–new_owning_site
Designates the desired owning site used with the –auto_noexport mode. This may be the local site or a remote site.

–include_bom
Includes assembly components, if any exist.

–exclude
Excludes the specified relation type and may be given multiple times. The database name (not display name) of the relation type must be used.

–include
Includes the specified relation type and may be given multiple times. The database name (not display name) of the relation type must be used. Use this option to force the inclusion of a relation type that is not specified by your IMAN_relation_export preference.

–ignore_am_rules
Ignores AM rules for recovery purposes.

–bp
Displays best practice recommendations.

–h
Displays help for the utility.

RESTRICTIONS

  1. At least one primary mode must be specified.

  2. Not more than one primary mode can be specified.

  3. For the –mode=auto and –mode=find options, exactly one object selection filter (–itemid, –filename, or –folder) must be specified.

EXAMPLES

In each of the following examples, the –u=user-id –p=password and –g=group arguments are assumed:

  • To restore ownership on an item with the ID MyCorruptItem:

    export_recovery -mode=auto -item_id=MyCorruptItem  
    -remote_site=Manufacturing
  • To restore ownership on objects contained in an export metafile without reimporting:

    export_recovery -mode=min -dir=metafile_dir
  • To reimport objects from the metafile and restore site ownership:

    export_recovery -mode=full -dir=metafile_dir
  • To generate a report of ownership inconsistencies:

    export_recovery -mode=find -filename=suspect_itemlist.dat 
    -report=report.dat
  • To restore site ownership after the –mode=auto option fails to restore ownership:

    export_recovery -mode=auto_noexport -item_id=xyz 
    -new_owning_site=Site1
  • To restore ownership of an entire assembly:

    export_recovery -mode=auto -item_id=Assy1 -remote_site=Site2 
    -include_bom