Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Copy entire space to another without comments

Rumceisz April 3, 2012

Hi All,

we use a space template with default pages and hierarchy but also comments were added to the space. Now we would like to copy the entire space but without comments.

I found the Confluence Command Line Interface but we don't know how we can define that comments are not needed.

Thanks in advance!

Regards,

Rumi

2 answers

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2012

copySpace from the Confluence Command Line Interface has options to copyComments. By default they are not copied.

Rumceisz April 3, 2012

Hi Bob,

can I have +1 question?

I never used CLI before, can you please review whether this code is correct?

@echo off
rem remember the directory path to this bat file
set dirPath=%~dp0

rem need to reverse windows names to posix names by changing \ to /
set dirPath=%dirPath:\=/%
rem remove blank at end of string
set dirPath=%dirPath:~0,-1%

rem - Customize for your installation, for instance you might want to add default parameters like the following:
rem   java -jar "%dirPath%"/lib/confluence-cli-2.5.0.jar --server http://my-server --user automation --password automation %*

java -jar http://<MY_CONFLUENCE>

confluence --action copySpace --space "<SPACEKEY1>" --newSpace "<SPACEKEY2>"


rem Exit with the correct error level.
EXIT /B %ERRORLEVEL%

Many thanks!

Rumi

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2012
No. Only customize the bat file to add your server address, userid, and password. Do not put actions in it! Run your action from the command line using the bat file: confluence --action copySpace ... Or don't change the bat file and always use ate server, user, and password directly on the command line.
0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 3, 2012

Hi Rumi,

have a look at the copy space plugin: https://plugins.atlassian.com/plugins/com.atlassian.confluence.plugin.copyspace

Maybe this can help you

Best regards

Thomas

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events