Migrating folders and content together in WebCenter Content
By Kyle Hatlestad on Jan 14, 2013
In the case of migrating from one WebCenter Content instance to another, there are several different tools within the system to accomplish that migration depending on what you need to move over.
This post will focus on the use case of needing to move a specific set of folders and their contents from one instance to another. And the folder architecture in this example is Folders_g. Although Framework Folders is the recommended folders component for WebCenter Content 11g PS5 and later, there are still cases where you must still use Folders_g (e.g. WebCenter Portal, Fusion Applications, Primavera, etc). Or perhaps you are at an older version and Folders_g is the only option.
To prepare, you must first have the FoldersStructureArchive component enabled on both the source and target instances. If you are on UCM 10g, this component will be available within the CS10gR35UpdateBundle/extras folder. In addition to enabling the component, there is a configuration flag to set. By default, the config variableArchiveFolderStructureOnly is set to false which means content will be exported along with the folders, so that can be left alone. The config variable AllowArchiveNoneFolderItem is set to true by default which means it will export content both in the folder structure as well as those not selected…or even outside of folders. Basically, it means you must use the Export Criteria in the archive to control the content to export. In our use case, we only want the content within the folders we select, so the configuration should be set as AllowArchiveNoneFolderItem=false. Now only content that is in our selected folders will get exported into the archive. This can be set in the General Configuration in the Admin Server.
You will also need to make sure the custom metadata fields on both instances is identical. If they are mismatched, the folders will not import into the target instance correctly. You can use the Configuration Migration Utility to migrate those metadata fields.
Once the component is enabled and configurations set, go to Administration -> Admin Applets -> Archiver and select Edit -> Add… to create a new archive.
Now that the archive is established, go back to the browser and go to Administration -> Folder Archiver Configuration. For the Collection Name, it will default to the local collection. Change this if your archive is in a different collection. Then select your Archive Name from the list.
Expand the folder hierarchy and you can now select the specific folder(s) you want to migrate. The thing to keep in mind are the parent folders to the ones you are selecting. If the idea is you want to migrate a certain section of the folder hierarchy to the other server and you want it to be in the same place in the target instance, you want to make sure that the parent folder already exists in the target. It is possible to migrate a folder and place it within a different parent folder in the target instance, but then you need to make sure you set the import maps correctly to specify the destination folder (more on that later).
Once they are selected, click the Add button to save the configuration. This will add the right criteria to the archive. Now go back to the Archiver applet. Highlight the archive and select Actions -> Export. Be sure ‘Export Tables’ is selected. Note: If you try using the Preview on either the contents or the Table data, both will show everything and not just what you selected. This is normal. The filtering of content and folders is not reflected in the Preview. Once completed, you can click on the View Batch Files… button to verify the results. You should see an entry for the Collections_arTables and one or more for the content items.
If you highlight the Collections row and click Edit, you can view and verify the results.
You can do the same for the document entries as well.
Once you have the archive exported, you need to transfer it from the source to the target instance. If I don’t have the outgoing providers set up to do the transfer, I sometimes cheat and copy over the archive folder from <cs instance dir>\archives\{archive name} directly over to the other instance. Then I manually modify the collection.hda file on the target to let it know about the archive:
@ResultSet Archives
2
aArchiveName
aArchiveDescription
exportfoldersandfiles
Export some folders and files
@end
Or if I have Site Studio installed and my archive is fairly small, I’ll take the approach described in this earlier post.
Before you import the archive on the target, you need to make sure the folders will be going into the right “parent” folder. If you’ve already migrated the parent folder to your folders to the target instance, then the IDs should match between instances and you should not have to do any import mappings. But if you are migrating the folders and the parent IDs will be different on the target (such as the main Contribution Folders or WebCenter Spaces root folder), then you will have to map those values.
First, to check what the folder’s ID is, you can simply place your mouse over the link to the particular folder to get it’s ID. It will be identified as dCollectionID in the URL. Do this on both the source and target instances.
In this example, the dCollectionID on the source instance for the parent folder (Contribution Folders) is 826127598928000002. On the target instance, its Contribution Folders ID is 838257920156000002. So that means when the top level ‘Product Management’ folder in our archive moves over, the ID that specifies the ParentID needs to be mapped to the new value. So now we have all the information we need for the mapping.
Go to the Archiver on the target instance and highlight the archive. Click on the Import Maps tab and then on the Table tab. Double-click on the folder and then expand they date entry. It should then show the Collections table.
Click on the Edit button for the Value Maps. For the Input Value, you want to enter the value of the dCollectionID of theparent folder from the source instance. In our example, this is 826127598928000002. For the Field, you want to change this to be the dParentCollectionID. And for the Output Value, you want this to be the dCollectionID of the parent folder in the target instance. In our example, this is 838257920156000002. Click the Add button.
This will now map the folders into the correct location on target.
The archive is now ready to be imported. Click on Actions -> Import and be sure the ‘Import Tables’ check-box is checked. To check for any issues, be sure to go to the logs at Administration -> Log Files -> Archiver Logs.
And that’s it. Your folders and files should now be migrated over.