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.
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.
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.
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.
The following scenario demonstrates the behavior.