Documentation Center

Undoing an import into Content Manager 2013 SP1 or later

After you have successfully performed an import, you have the option to undo the import.

Undoing an import may be necessary in situations like the following:

  • You performed the import by reusing a previously saved file with import settings, and accidentally selected the wrong file.
  • You are importing the same intermediate package to multiple Content Manager instances, and one of the imports fails. You now want to undo all the successful imports into all the other Content Manager instances.

The following rules of thumb are most important to remember when considering an undo:

  • The longer ago the import took place, the less likely it is that the undo will succeed.
  • The more users are working on the Content Manager, the less likely it is that the undo will succeed.
  • The more imports have been performed after the import you want to undo, the less likely it is that the undo will succeed.

An undo will typically fail if one of the import items, or items dependent on it, have changed on the Content Manager instance after the import. However, if it looks like a change was made that restored the item to its original state (before the import), undo will skip the item rather than fail.

An undo consists of the following operations:

  • Deleting any item that was created during the import, unless the item was already deleted by a user after the import, in which case the item is skipped.
  • Rolling back any versioned item (such as Components, Pages, Templates etc) to its pre-import version if it was updated.
  • Restoring any non-versioned item that was updated (such as Folders, Publications, etc) to the pre-import version by restoring a saved backup of the file from the Undo Package.
  • Unlocalizing any item that was localized as part of the import.

Whether an undo succeeds depends on the ability to return the Content Manager instance to a consistent state. Undo is a transactional operation, which means that one inconsistency causes the entire undo to fail. The following things cause an undo operation to fail as soon as they are detected:

All undo operations fail if:
  • The item is in use (checked out or in workflow)
  • The item was published since the import
Deleting an item fails if:
  • The item has changed after the import (that is, if the item has a modification time later than the end time of the import)
  • There are other items referring to any version of the item
  • The item has been localized in a child Publication since the import
  • You have no rights to delete the item
Restoring a non-versioned item fails if:
  • The item has changed after the import (that is, if the item has a modification time later than the end time of the import, but not if it was rolled back; see below)
  • The backed-up version refers to items that no longer exist
  • The backed-up version would create a uniqueness conflict (e.g. its name is the name of a new item that was created in the same location after the import)
  • The backed-up version is based on a Schema that is not the linked Schema that was set for the containing folder after the import
  • The item to restore is in use in workflow (if the item to restore is a Workflow Process Definition)
Unlocalizing an item fails if:
  • The item has changed after the import (that is, if the item has a modification time later than the end time of the import)
  • Unlocalizing the item would create a uniqueness conflict
  • Unlocalizing the item would give it a Schema that is not the linked Schema that was set for the containing folder after the import.

Note that the rule that if you use custom code, rather than the Content Porter client, to interact with the Import and Export service, you can disable the rule that changed items cause the undo to fail, by configuring UndoInstruction. If you do, the undo will disregard any changes made to the item after the import, and it will delete, restore or unlocalize the item.

On the other hand, if the undo process detects actions performed by users to an item on the import system after the import, which effectively undid the import of that item, it will skip the planned undo operation for that item. Concretely, this means the following:

Deleting an item is skipped if:
  • The imported item no longer exists (that is, it was deleted after the import)
Deleting application data is skipped if:
  • The application no longer exists (that is, it was deleted after the import)
Restoring a versioned item is skipped if:
  • The imported item no longer exists (that is, it was deleted after the import)
  • The item was unlocalized after the import.
  • The item was rolled back after the import to a version equal to or lower than the version to which the undo wants to roll back.
Restoring application data is skipped if:
  • The imported item no longer exists (that is, it was deleted after the import)
Restoring a non-versioned item is skipped if:
  • The imported item no longer exists (that is, it was deleted after the import)
  • The item was unlocalized since the import
Unlocalizing an item is skipped if:
  • The imported item no longer exists (that is, it was deleted after the import)
  • The item was unlocalized since the import