Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence CLI runFromContentList action failing due to inability to handle replacement variable

Alex Meretten April 5, 2019

Anyone have any thoughts on the below? I'm able to get it to run, but it chokes on the @pageId@ replacement variable:

./confluence.sh --action runFromContentList --cql $sourceSpaceKey -s "$sourceServer" -u $sourceUser -p $sourceUserPassword --limit "1" --common: '-a copyPage --targetServer $destServer --space $destSpaceKey --parent @home --id @pageId@ --copyAttachments --copyComments --copyLabels --copyBlogs --simulate' --verbose

I'm certainly open to other ideas, as well, if there's something I'm missing. I just need to deadlift a bunch of content out of a space on one server to a new space in another.

2 answers

1 accepted

0 votes
Answer accepted
Alex Meretten April 8, 2019

To close out (and avoid the DenverCoder9 Paradox), I used the copyPage action on the root page of the space on the source server, alongside the --copyAttachments --copyComments --copyLabels --descendents flags.

0 votes
Alex Meretten April 5, 2019

Adding: this is the actual error I get when running it:

Run: -a copyPage --targetServer $destServer --space $destSpaceKey --parent @home --id @pageId@ --copyAttachments --copyComments --copyLabels --copyBlogs --simulate

Error: Unable to convert '@pageId@' to a Long.
Client error: 1 actions failedorg.swift.common.cli.CliClient$ClientException: 1 actions failed at org.swift.common.cli.helpers.RunHelper.getRunActionCompletionMessage(RunHelper.java:255) at org.swift.common.cli.CliClient.getRunActionCompletionMessage(CliClient.java:1524) at org.swift.confluence.cli.helpers.ContentHelper.runFromContentList(ContentHelper.java:624) at org.swift.confluence.cli.ConfluenceClient.handleRequest(ConfluenceClient.java:845) at org.swift.common.cli.DefaultRemoteClient.process(DefaultRemoteClient.java:748) at org.swift.common.cli.CliClient.doWork(CliClient.java:689) at org.swift.common.cli.CliClient.doWork(CliClient.java:646) at org.swift.confluence.cli.ConfluenceClient.main(ConfluenceClient.java:179)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events