For Fedex V I created a plugin that allows a Confluence space to be copied. This is partially in response to the existence of CONF-3191, but it's more because the workaround is horrible. Occasionally when I've been working in support, I've been asked about how to copy a space, and it always makes me cringe.
The plugin I wrote provides an extra link on the Space Admin screen:
The user submits the form, with the new space name and key, then waits while their space is copied. The new space provides a link back to the original in the Space Admin screen.
The plugin duplicates most of the space's attributes and content, including:
- the space description
- the space and team labels
- the labels on all the pages in the space
- the current versions of all pages, in their proper hierarchy
- the space permissions
- the page level restrictions on all pages
- the attachments on all pages
- the current theme, logo and colour scheme
- the page templates
- Optionally, all comments on all pages, leaving their authors and dates intact.
- Optionally, the author and editing time of all non-comment content in the copy, (otherwise the copier authoer and copy time is used).
Some of the space's features are not copied (for no better reason than my not having time to implement it on fedex day):
- News items (blogposts)
- past versions of anything (eg page history is not copied)
- things I don't know about (eg if another plugin stores information about a space or its content somewhere, then that information is not copied. I didn't provide a means for other plugins to be aware of space copying either. Publishing an event would be a good start.)
The space copying could really do with a progress bar too.


10 Comment(s)
It might be worth pulling all the data for Bandana for a space and copy that over to the new space. To notify the plugin that the copying had just been done you could also publish the SpaceCopyEvent after that, so that if the plugin has space specific data stored it can be updated manually.
By Dan Hardiker at May 21, 2007 12:15 AM
Yes, I did think about copying everything out of Bandana, but I was concerned that it could do significant harm. Eg plugins might be written under the assumption that they are the only thing that will use their key. They might store something in Bandana that they "know" will be globally unique and apply only to that space. I decided it would be safer not to copy anything I didn't understand.
Would any/many of your plugins be helped by copying a space's Bandana data? How many plugins would you update to listen for the SpaceCopyEvent if I were to publish the event (and of course the actual plugin)?
By Don Willis at May 21, 2007 1:49 AM
Hi
I have been searching high and low for a 'copy space' plugin. Any chance of trying the plugin out? Have a space which is approx 70m...help :)
By Dave Harris at June 28, 2007 10:27 PM
Hi
Sorry to be a pain but can you send again due to email problems.
Thanks in advance
Dave
By Dave Harris at June 29, 2007 8:54 AM
Hi Don,
I'd love to try your plugin out. Would it be possible to you to send me your plugin?
Ron
By Ron Stewart at July 5, 2007 10:01 AM
I would also love to try you plugin. Will it work with Version: 2.2.6a Build:#522 Jul 12, 2006? If so please send it to me as the listed workaround does not work.
Thanks-
Mark
By Mark D Arking at July 6, 2007 8:46 AM
Hi Don,
Can you please try to email you plugin again. If you zip it up we shouldn't have any security issues with your email getting rejected.
Thanks,
Ron
By Ron Stewart at July 9, 2007 9:06 AM
I could really use something like this. Where can I find the plug-in? Could you email it to me if it is not online?
ray
By Ray Johnson at July 27, 2007 3:05 PM
I also would like to try this plugin. It sound very valuable to us.
Please let us know if it is already available?
regards
hanspeter
By Hanspeter at August 20, 2007 6:48 AM
Sorry all, I still haven't published this plugin. I will hopefully get around to it next week. I will comment here when I do.
By Don Willis at August 20, 2007 4:07 PM