Copies webs, topics, attachments, or part of them

This extension can be used to copy topics and webs. It allows to select which parts of an item is to copied.

Typical use cases are:

  1. duplicate topic assets: copy attachments, comments or preference settings to another existing topic
  2. deploy wiki applications: copy a selection of topics to a target web
  3. workflow scenarios: separate work on a draft topic from its last approved version by creating a copy first and copy the finished draft over as a newly approved version
  4. versioned webs: create a new web for each version of a product
  5. merge webs: create a new web by copying a list of webs to the new web
  6. publish content: from a closed quality-managed authors-only area to a public read-only web


The work horse for all operation modes is a single service script called copy. It takes a mode parameter for which a copy agent is created to perform the actual operation. The basic skeleton for a form to call the copy service looks like this:

<form action="%SCRIPTURLPATH{"copy"}%/%WEB%/%TOPIC%" method="post">
  <input type="hidden" name="mode" value="topic" />
  <input type="hidden" name="includepart" value="fields" />
  <input type="hidden" name="includepart" value="form" />

  <input type="text" name="destination" size="80" />

  <!-- more parameters -->

  <input type="submit" />



Name Description Default
mode select the type of operation; possible values are:
  • topic: copy one topic or parts of it to a destination topic
  • topics: copy a list of topic to a destination
  • web: copy a web to a destination
debug boolean flag to switch on/off debug output; messages are printed to the error log of the web browser off
dry boolean flag to switch on/off a dry mode; if enabled none of the operations will actually be saved permanently off
onlynew boolean flag to enable/disable a check for the destination to already exist; an exception will be raised if enabled and the target object already; the target object will be overwritten in case it already exists and the flag is disabled; to be precise, a new revision will be created in this case on
clear boolean flag; when enabled data on the destination will be deleted first before copying the source data; (exception: text is always cleared before copying it over); when disabled data of source and destination will be merged off
redirectto topic or url where to redirect the browser after a successful copy operation  

Mode: topic

Name Description Default
source the source topic to be copied %BASEWEB%.%BASETOPIC%
destination the destination topic where to copy source to source
includepart, includeparts a list of parts of a topic to be copied; known part-ids are text, attachments, all, preferences, parent, form, fields, or any other custom meta data alias such as comment from MetaCommentPlugin all
excludepart, excludeparts a list of parts to exclude from the copy process  
include<part-id> when meta data is named as is the case for fields you may specify a regular expression in includefields that all fields must match when copying formfields  
exclude<part-id> same as include<part-id> but in reverse logic  

Mode: topics

Name Description Default
source a list of topics to be copied %BASEWEB%.%BASETOPIC%
destination the destination where to copy all source topics to; this can either be a web or a topic; in the latter case all source topcis will be copied to the destination  

All parameters of the topic mode apply to each topic in the source list.

Mode: web

Name Description Default
source the source web to be copied %BASEWEB%
destination the destination web where to copy all topics of the source web to  
template a template web to be used in case the destination web does not exist yet and needs to be created on the base of a template _empty
search search expression to find topics in the source web. See QuerySearch for more information .*
include regular expression topics in the source web must match to be included in the copy process  
exclude regluar expression; excludes matching topics from the source web  


Copy one or more topics to a destination


separate multiple topics with a comma


can be a topic or a web

Include parts:

leave unchecked to copy all

Exclude parts:


Copy a web but strip all comments


insert source web


insert a search query


insert a destination web

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See for more help.


Author(s): Michael Daum
Copyright: © 2013, Michael Daum
License: GPL (Gnu General Public License)
Release: 1.00
Version: 1.00
Change History:  
22 Oct 2013: initial release
Dependencies: None
Contrib Home:
Topic revision: r1 - 20 Sep 2013, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding FAIR Wiki? Send feedback