SDL Web 8 introduces the ability for business users to view items in the website as well as create new Publications in a site wizard. These features rely on the new style publishing introduced as part of the topology management features of SDL Web 8.
In order to take advantage of the new features on an existing system, implementers and customers have asked for a way to migrate items published using legacy publication targets to the new-style content delivery environments in Topology Manager. After upgrade to SDL Web 8.1.1+, you may want to migrate items published via old-style Publication Target and avoid needing to republish items.
This post describes a cmdlet developed by SDL Web R&D to help implementers manage and repurpose legacy publishing setups. The following posts will include an example powershell script that uses this cmdlet as well as how to re-use existing purposes in new Business Process Types.
Use the Convert-TcmPublishStates cmdlet tool when:
This script resets the publish states for items that were published to a source Publication Target and changes it to the "new-style" Target Type. The source publishing target could be either an old-style Publication Target or new-style Target Type.
Notes and recommendations:
In order to run Convert-TcmPublishStates cmdlet:
In Powershell execute:
To get help on Convert-TcmPublishStates cmdlet execute:
Get-Help Convert-TcmPublishStates -Full
1) This example repurposes published items from Target Type with id 1 to Target Type with id 2 on Microsoft SQL Server database.
Convert-TcmPublishStates -DatabaseType MsSql -SourceId 1 -SourceType TargetType -DestinationTargetTypeId 2 -Server localhost -DatabaseName Tridion_cm -User sa -Password password
2) This example repurposes published items from Publication Target with id 2 to Target Type with id 3 on Oracle database on Tridion_cm schema. Scope of the conversion is limited to Publication with id 4.
Convert-TcmPublishStates -DatabaseType Oracle -SourceId 2 -SourceType PublicationTarget -DestinationTargetTypeId 3 -PublicationId 4 -NetServiceName OracleInstance -SchemaName Tridion_cm -User system -Password password
3) This example repurposes published items from Publication Target with id 2 to Target Type with id 3 on Oracle database on Tridion_cm schema specifying that connection user has SYSDBA role.
Convert-TcmPublishStates -DatabaseType Oracle -SourceId 2 -SourceType PublicationTarget -DestinationTargetTypeId 3 -NetServiceName OracleInstance -SchemaName Tridion_cm -User sys -Password password -AsSysDba
In the next post, we share an example script that uses this cmdlet.
in an attempt to migrate from old-style targettypes to new-style topologymanager targettypes I want to use the powershell tool convert-TcmPublishstates. I know the Id of the old targettypes, but where can I find the Id of the new-style targettypes? I do not have access to the Web8-database. First thought it might be something like 'staging' or 'live' (purposes), but the Id has to be an integer. Can you help me?
Theo van Hulst , it is Id of the Target Type that was created with Business Process Type. Unfortunately, it is a bit hidden in Ui these days, you can try to see its Id (the middle part in the TCM URI tcm:0-xxx-65538) in the Publish dialog or in Publishing queue.
ah, thanks a lot