TeamcenterKnowledge

Data sharing utilities

export_recovery

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 TC_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 TC_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. Use the export_recovery utility when an export with transfer of site ownership fails, resulting in objects within an item having inconsistent site ownership. The mode of recovery to use depends on whether there is a valid export directory. The directory must include the objects.meta file. Siemens Digital Industries Software recommends the following order for attempting export recovery procedures; you should try the succeeding procedure only if you cannot perform the previous one or if the previous one fails to restore site ownership: If a valid export directory exists (most likely in the TC_transfer_area of the exporting or importing site), use either full or min mode while specifying the valid export directory with the -dir= switch. If you attempt to recover at the exporting site, use min mode; if you attempt to recover at the importing site, use full mode. If a valid export directory does not exist, you must attempt recovery from a valid database copy that may be a replica or one with inconsistent site ownership. Use export_recovery in auto mode. Specify the -include_bom switch if appropriate. Specify -exclude and/or -include switches, if desired. If the auto mode fails to restore site ownership, perform the manual export recovery procedure: Define the TC_EXPORT_COPY=TRUE environment variable. Run item_export as a Teamcenter administrative user to transfer site ownership to any site. Run export_recovery in min mode specifying the directory output in step 2 as the -dir= parameter. If successful, delete the export directory from step 2. Syntax export_recovery [-u=user-id {-p=password | -pf=password-file} -g=group] -mode={ full | min | auto | find } [-item_id=item-id-to-restore] | [-key=[keyAttr1=keyVal1] [,keyAttr2=keyVal2]…[,keyAttrN=keyValN]] | [-folder=folder-name] | [-filename=file-name] | [-itemKeyFile=file-name] | [-dir=directory] [-report=report-file] [-remote_site=last-transfer-site] [-include_bom] [-real_owning_site=desired-owning-site] [-exclude=relation-type1 -exclude=relation-type2 ...] [-include=relation-type3 -include=relation-type4 ...] [-ignore_am_rules] [-update_lmd] [-bp] [-h] Arguments -u Specifies the user ID. This is a user with Teamcenter administration privileges. If Security Services single sign-on (SSO) is enabled for your server, the -u and -p arguments are authenticated externally through SSO rather than being authenticated against the Teamcenter database. If you do not supply these arguments, the utility attempts to join an existing SSO session. If no session is found, you are prompted to enter a user ID and password. -p Specifies the password. This argument is mutually exclusive with the -pf argument. -pf Specifies the password file. For more information about managing password files, see Manage password files. This argument is mutually exclusive with the -p argument. -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 operates. The value of this argument can be one of the following: full Restores objects from the export metafile, imports them in to your database and restores ownership to your site. min Restores ownership to your site without reimporting data from the metafile. Valid only if the metafile was generated with transfer of ownership. auto Restores ownership on the specified item without reimporting. You must specify the -itemid argument and either the -remote_site or -real_owning_site arguments when using this mode. find Searches for items with inconsistent site ownership and generates a report. -dir Defines the path of the directory containing the exported metafile and the data files. Required only with the -mode=full and -mode=min arguments. -item_id Specifies the ID of the item to process. Wildcards are allowed. -folder Defines the name of the Teamcenter folder containing the list of items to process. -filename Defines the full path of the file that contains the list of items to process. -key Specifies the keys of the items to process. Use the following format: Copy [keyAttr1=keyVal1] [,keyAttr2=keyVal2]…[,keyAttrN=keyValN] To find the key of an object, use the get_key_string utility. -itemKeyFile Specifies the name of the input file containing the keys to process. The file format is: Copy -key = [keyAttr1=keyVal1][keyAttr2=keyVal2]… -key =[keyAttr1=keyVal1][keyAttr2=keyVal2]… -key =[keyAttr1=keyVal1][keyAttr2=’keyVal2’]… -remote_site Defines the last site for which a transfer of ownership was attempted. This argument is valid only with the auto mode. -report Specifies the full path of the report file. Valid only with find mode. -real_owning_site Changes the owning site of specified objects to the site designated. Valid only with the -mode=auto argument. -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 the display name) of the relation type must be used. Use this argument to force the inclusion of a relation type that is not specified by your TC_relation_required_on_export preference. -ignore_am_rules Ignores AM rules for recovery purposes. -update_lmd Updates the last modified user and date. Valid only with the -mode=auto argument. -bp Displays best practices information. -h Displays help for this utility. Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in Log files produced by Teamcenter. Restrictions To use this utility, you must be a user with system administration privileges or be granted authorization by a user with system administration privileges. At least one primary mode must be specified. Not more than one primary mode can be specified. 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: Copy export_recovery -mode=auto -item_id=MyCorruptItem -remote_site=Manufacturing To restore ownership on objects contained in an export metafile without reimporting: Copy export_recovery -mode=min -dir=metafile_dir To reimport objects from the metafile and restore site ownership: Copy export_recovery -mode=full -dir=metafile_dir To generate a report of ownership inconsistencies: Copy export_recovery -mode=find -filename=suspect_itemlist.dat -report=report.dat To make an item (xyz) in the local site a replica that is owned by another site (Site2): Copy export_recovery -mode=auto -item_id=xyz -real_owning_site=Site2 To restore ownership of an entire assembly: Copy export_recovery -mode=auto -item_id=Assy1 -remote_site=Site2 -include_bom Related Topics TC XML and PLM XML Configuration for Data Import and Export Multi-Site Collaboration

Source: https://docs.sw.siemens.com/documentation/external/PL20251212545240207/en-US/tc_help/utilities_reference/avt1737253695886/export_recovery.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)