Cannot use copySpace action with Confluence CLI

Daniel Kosinski January 22, 2019

I'm an admin on two confluence instances. I want to copy space from one confluence to another one.

When running this command:

confluence.sh --server https://from_server/ --user myUser1 --password password1 --action copySpace --space SPC --targetServer https://target_server --targetUser myUser2 --targetPassword password2 --newSpace NSPC --replace

 I'm getting this error:

Remote error: Resource does not exist. Response code: 404. Use -v to see more details.

Client error: Could not login to https://target_server

Now this is weird because when I run

--action getSpaceList

On both instances i.e. https://target_server and https://from_server I get correct output just fine which to me indicates that I can login to https://target_server without any problems.

I'm at complete loss as to what's happening here. Running with --verbose and --debug doesn't help much.

3 answers

1 accepted

0 votes
Answer accepted
Daniel Kosinski February 1, 2019

Ok, finally figured it out.

When you want to use copySpace action you need to add /wiki to your --server and --targetServer i.e. --server http://fromserver.example.com won't work it has to be --server http://fromserver.example.com/wiki

Which is super weird because documentation doesn't say anything about it.

 

This is only applicable for cloud instances of confluence, maybe if you're running hosted confluence on your server just passing full url is ok.

Deleted user February 1, 2019

Thanks @Daniel Kosinski for cloud you need to contest path! :)

0 votes
Deleted user January 24, 2019

Hi @Daniel Kosinski,

 

Your command is perfectly alright, we have tested this this internally and find working. 

It may look like some communication issue between Source_server to target_server. try to ping and telnet from source server to target server and check if network communication between two servers.

 

Regards

M.Sridhar

0 votes
Deleted user January 24, 2019

Hi @Daniel Kosinski,

Your command is perfectly alright, we have tested this this internally. 

It may look like some communication issue between from_server to target_server. try to ping and telnet from source server to target server and check if network communication between two servers.

 

Regards

M.Sridhar

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events