Sitemap

Friday, June 19, 2015

Migrate contents present in framework folders to another instance

Replicating the folder structure for Framework Folders from one server to another is accomplished by using Archiver to replicate the necessary tables.

In Archiver, if you just want to move the folder structure, you would export/import these tables:
FolderFolders
FolderMetaDefaults

If you want to move content also, you will also need FolderFiles table.

When configuring the Archive to export, include the Framework Folders tables:

  + navigate to the "Export Data" tab
  + click on the "Table" tab
  + click "Add" and include the following tables: FolderFolders, FolderFiles, FolderMetaDefaults

This should allow new folders & folder changes to be migrated/replicated.

NOTE: by default all files/content will be archived as well. If you only want to export the Folder structure then add a dummy condition to the Export Query under the "Content" tab (e.g. where Content ID is -1)

See the documentation here for steps on how to add a table to an archive: http://docs.oracle.com/cd/E23943_01/doc.1111/e10792/c08_migration.htm#CHDJAABJ






Since migrating folders implies exporting tables, you can specify an export query, where you can tell which folder you want to export. 
You can for example specify in the export query the fFolderGuid of 'Folder2' so that only that folder gets exported. If you export the files you would have to export the FolderFiles tables, and specify the fParentGuid with the ID of 'Folder2' (fFolderGuid). 





If you want to export all sub folders, you need to create a custom Query Expression, that recursively gets all sub folders. 

For example, to export all subfolders from FolderFolders, starting with the folder with the ID 6CCC155115BC5BF7D9EEA691B1EBB41F, use: 

fFolderGUID IN (select ff.fFolderGUID 
from folderfolders ff 
connect by prior ff.ffolderguid = ff.fparentguid 
start with ff.ffolderguid = '6CCC155115BC5BF7D9EEA691B1EBB41F') 

You can re-use the same custom Query expression for FolderMetaDefaults 

to export all files in a folder hierarchy, you need to use the query below instead: 

fParentGUID IN (select ff.fFolderGUID 
from folderfolders ff 
connect by prior ff.ffolderguid = ff.fparentguid 
start with ff.ffolderguid = '6CCC155115BC5BF7D9EEA691B1EBB41F') 

No comments:

Post a Comment