OnDemand "Copy Space" issues lead to CLI copySpace syntax and usage questions

Hi,

I am using Confluence OnDemand for technical doc and (trying) to follow the release management strategy described in the OnDemand doc on this page:

https://confluence.atlassian.com/display/AOD/Managing+the+Life+Cycle+of+your+Technical+Documentation

Everything makes sense until you get to the part where you have to use the Copy Space add-on to move your live space to your release space. Then you find out that if you are using OnDemand (which I am), then you cannot use the Copy Space add-on.

It seems like the only way to copy your live space to a release space is through the CLI, so here I am with a few questions.

***

What I have done so far:

Read the CLI doc and various related posts

Installed JRE 1.7

In our Confluence instance -- cog icon>Confluence Admin>General Configuration>Feature Settings>Remote API -- this is checked, but it's also grayed out -- does this mean that it's enabled? I hope so.

Downloaded and unzipped the CLI pkg.

Determined the following values:

Server base URL of our OnDemand instance = https://parelastic.jira.com/wiki

Spacekey
of space I want to copy = CD

Spacekey of new space I want to create = TEST12

***

What I plan to do:

On my Windows laptop, open a cmd window and cd to the dir that has confluence.bat Type:

confluence --user=myAdminUsernameForOnDemand --password=correspondingPW --server=https://parelastic.jira.com/wiki --action=copySpace --space=CD --newSpace=TEST12

Press Enter and away we go...

Will this syntax work?

Then, from within my browser, I should be able to find the newly created space called TEST12, which has identical content to the old space called CD? At that point I can adjust permissions accordingly, so TEST12 has just the permissions we want for a release space?

Question: in the CLI syntax, does the newSpace arg have to refer to a space that DOES NOT currently exist? What happens if the newSpace -- in this case TEST12 -- already existed? Does the CLI overwrite the content or fail or?

Thanks in advance for your help!

Laurel

1 answer

1 accepted

This widget could not be displayed.
  1. It is greyed out until you select Edit. The check indicates it is on which is the default for OnDemand.
  2. Syntax looks about right. I always recommend hiding the user/password/server parameters in your confluence.bat file, but it will work either way.
  3. Yes, TEST12 should be created with a copy of the spaces from the original space. There are options on the copySpace action on whether you want to copy attachments, comments, etc...
  4. Normally the newSpace parameter space must NOT exist. However, if you use --replace then it will copy the pages over to an existing space.
  5. You can always test this with a small example space that you can delete later.

References:

  1. Documentation
  2. Examples

Thanks Bob. I created a small test space (using default theme) and things worked fine for me as long as I included --replace and --copyAttachments.

However, I then tried copying my real doc space -- which uses the Documentation Theme -- and the copySpace action copied all the pages but completely lost the theme.

Meaning no left hand nav pane, no company logo etc. Although all the content seems to be there, the lack of organization/presentation that you see in the original space means that the copy is completely unusable as customer doc.

I looked at the Documenation page you sent as a reference and reviewed all the copySpace args:

title, description, findReplace, findReplaceRegex, replace, copyAttachments, copyLabels, copyComments, commentPrefix, targetServer

But none of those seemed relevant to my problem.

I also searched your doc space for "theme" -- nothing.

So my question is -- is there a way to copy my original space in such a way that the copied space actually looks like the original space?

Or do I have to go into the copied space and configure it all over again by hand?

Thanks,

Laurel

It is just going to create the space using the standard Confluence defaults. There are no APIs available to get/recreate the theme. That will need to be done after the fact by editing the space theme. If you need that to be done via automation, Script to configure space themes has info on how I manage space themes on my Confluence OnDemand site.

I took a quick look at the doc for the script-to-configure-theme and (sorry if I missed it) -- but does this script preserve the order of the pages within the left hand nav pane?

We're not doing doc automation at this point, and it's not a big deal to manually apply the doc theme and custom graphic effects every time I release the doc. But having to move around hundreds of topics in the page view is a bit of a chore (the pages stay in their groups or chapters or sections or whatever -- but they get reordered alphabetically, not the way they originally/logically were).

So if the script does that too (keep page order in nav pane) I'll definitely dig deeper.

In any event, I really appreciate your CLI tool and your help.

Many thanks,

Laurel

No, custom page ordering is not available via remote APIs :(.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

476 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you