eXo Platform 3.0

- Prev

## Chapter 9. Cookbook

## How to Copy a Site

This section describes how to copy a work done on the eXo Platform server, such as creating navigations, node types and templates, to another Platform servers. To copy the whole site, you need to do the following actions:

### Copy the site content folder with its versions history

Do as follows:

Step 1: Go to the Sites Management drive.

Step 2: Open the site node, for example "acme".

Step 3: Click Export Node to export the node with its version history as below:

Step 4: Select Export or Export version history to perform exporting, or Cancel to discard exporting.

Step 5: Click Import Node to open the Import Node form.

Step 6: Select the exported nodes and versions history to be imported, or Cancel to discard importing.

One pop-up message will appear to inform that you have imported successfully as below:

### Copy navigation nodes of sites

Do as follows:

Step 1: Add a new drive to both target and source servers.

Step 2: Export the navigation node.

Step 3: Import the nodes navigation.

### Copy the template of node type

### Note

If you have some specific JCR namespaces and node types, you will have to import them to the new server.

Do as follows:

Step 1: Add the System drive to both servers.

Step 2: Open system:/jcr:system/exo:namespaces/{namespacename}}}}}}}, and export it.

Step 3: Open system:/jcr:system/exo:namespaces/, and import the exported file as described in Step 2.

Step 4: Open system:/jcr:system/jcr:nodetypes/}}}{}}}nodetype}}}}}}}, and export it.

Step 5: Open system:/jcr:system/jcr:nodetypes/, and import the exported file as described in Step 4.

### Copy WCM templates

### Note

If you have some specific WCM (CLV/PCLV) views and/or templates of node types, you will need to import them in the new server.

Do as follows:

Step 1: Open the DMS Administration drive.

Step 2: Open dms-system:/exo:ecm/templates/}}}{}}}nodetype}}}}}}} , and export it.

Step 3: Open dms-system:/exo:ecm/templates/, and import the exported file.

Also, for CLV/PCLV templates, you can find all template views defined in the dms-system:/exo:ecm/views path with:

- userviews: this folder contains SiteExplorer's views with a set of actions.

- templates: where you can find all gtmpl templates of:

  - Category Navigation Portlet templates.

  - Content List Viewer (CLV) templates and its paginator templates.

  - content-browser templates (Deprecated Portlet).

  - ecm-explorer templates: Those templates are used to define how to display nodes in the the SiteExplorer Portlet, such as CoverFlow template, IconView template.

  - Parameterized Content List Viewer (PCLV) templates and its paginator templates.

  - WCM Advanced Search: this template is used in the WCM Search portlet to define the form, layout, result and result's paginator.

If you want to reuse one of the non-predefined templates above, you simply need to export and import it in the new server at the same place.

### Copy a Taxonomy tree

By importing the whole site as described in the Copy the site content folder with its versions history section, you will also have the Taxonomy tree imported. The default location where the site's Taxonomy is placed in a sub-folder named category. So, you do not need to export or import them because this step is automatically done. But the Taxonomy tree definition is still not fully imported in the new server. What you now need to do is to add this Taxonomy Tree definition by following those steps:

Step 1: Open the DMS Administration drive in the new server.

Step 2: Go to dms-system:/exo:ecm/exo:taxonomyTrees/definition/.

Step 3: Add a symlink to the Taxonomy Tree Root Node, for example "collaboration:/sites content/live/acme/categories/acme".

The name of symlink will be displayed as "acme".

The symlink will be generated as below:

Note that in some cases, you need to clean cache by disconnecting or restarting the server to see modifications.

### Copy metadata templates

Do as follows:

Step 1: Open the DMS Administration drive in the new server.

Step 2: Go to /exo:ecm/metadata/}}}{}}}metadataname}}}}}}}.

Step 3: Export and re-import it in the same location in the new server.

### Copy queries

Do as follows:

Step 1: Open the DMS Administration drive in the new server.

Step 2: Go to "/exo:ecm/queries/}}}{}}}queryname}}}}}}}".

Step 3: Export and re-import it in the same location in the new server.

### Copy scripts

Do as follows:

Step 1: Open the DMS Administration drive in the new server.

Step 2: Go to "/exo:ecm/scripts/ecm-explorer/".

You will find three folders referring to the three types of groovy scripts in eXo Platform, including:

- - action: The action scripts are launched when an ECM action triggers them. For more information, refer to Actions Concept.

- - interceptor: Interceptor scripts will be triggered before and/or after a JCR node is saved, or when a node is created or edited. They are used to either validate the value entered in a form or to manipulate the newly created node, for example, to map the new node with a forum thread or any other type of discussion areas.

- - widget: Widget scripts are used to fill widgets, such as a select box in a dynamic way.

Step 3: Export your customized script in the same location in the new server.

### Copy drive configurations

Do as follows:

Step 1: Open the DMS Administration drive in the new server.

Step 2: Go to /exo:ecm/exo:drives/}}}{}}}drivename}}}}}}}.

Step 3: Export and re-import it in the same location in the new server.

### Copy gadgets

Do as follows:

Step 1: Open the drive that points into Portal-System Workspace.

Step 2: Go to your gadget "portal-system:/production/app:gadgets/}}}{}}}gadgetnamee}}}}}}}".

Step 3: Export and re-import it in the same location in the new server.

### Restart server

After importing the site navigation nodes, the site will look like:

So, you need to restart the server. The site will look like:

}}}

- Prev
- Up
- Home