Renaming and replacing objects on import

The bfimport command and the Import utility rename an imported object if an object with the same name already exists in the database. Renaming objects on import is the default behavior.

To change this behavior and replace existing objects on import, you must specify the -r option for bfimport or select the Replace Entities option in the UI.

The following topics describe the naming conventions that the bfimport command and Import utility use when renaming and replacing imported objects.

Snapshot objects (projects, selectors, and environments) retain their snapshot name, if they have one, or are assigned a default snapshot name on import.

Renaming objects in 7.1 or earlier export files

For objects in 7.1 and earlier export files, the bfimport command and the Import utility rename objects in the UI by using the following naming conventions.

Object status UI object name UI snapshot name (applies to snapshot objects only)
New, not in database <new_object_name> <snapshot_name>
Exists in database <existing_object_name>_IMPORT_<n> <snapshot_name> | Base Snapshot

Snapshot objects are imported as a new parent-level snapshot, even if it was a child of a parent snapshot. Only projects, selectors, and environments can be snapshot objects. If a snapshot name exists, it is retained. Otherwise, the default Base Snapshot name is assigned, as shown in the table.

Replacing objects in pre-7.1 export files

For objects in pre-7.1 export files, the bfimport command and the Import utility replace objects in the UI by using the following naming conventions. Note that snapshot objects are evaluated for replacement by UUID rather than name.

Object status UI object name UI snapshot name (applies to snapshot objects only)
New, not in database <new_object_name> Base Snapshot
Exists in database, non-snapshot object <existing_object_name n/a
Exists in database, snapshot object <existing_object_name>_IMPORT_<n> Base Snapshot

For snapshot objects, the snapshot object is imported as a new parent-level snapshot, even if it was a child of a parent snapshot. Only projects, selectors, and environments can be snapshot objects. Pre-7.1 export files cannot contain objects with snapshot names, so the default Base Snapshot name is assigned, as shown in the table.

Replacing objects in 7.1 export files

For objects in 7.1 export files, the bfimport command and the Import utility replace objects in the UI by using the following naming conventions.

Object status UI object name UI snapshot name (applies to snapshot objects only)
New, not in database <new_object_name> <snapshot_name> | Base Snapshot
Exists in database <new_object_name> <snapshot_name> | Base Snapshot

Snapshot objects are evaluated for replacement by UUID rather than by name. A snapshot object is imported as a new parent-level snapshot, even if it was a child of a parent snapshot. Only projects, selectors, and environments can be snapshot objects. All 7.1 objects either have a unique snapshot name or use the default Base Snapshot name.

Snapshot import and replacement scenario

Snapshot objects are evaluated for replacement using their UUID rather than their name. Use care when importing snapshot objects multiple times.

The following scenario demonstrates the behavior.

  1. A snapshot object is exported from system A and imported on an empty system B. The imported objects on system A have the same UUID as they did on system B.
  2. The snapshot object attributes are modified on system A, including the name.
  3. The snapshot object is again exported from system A and imported on system B with the replace option. The UUIDs match, so the snapshot object is replaced. The replaced object on system B now bears all of the changed attributes of the object on system A, including the changed name.