We changed the URL to our confluence server and I wanted to update any hard links to the old URL with the new URL using the CLI tool. However I am running into problems.
I tried using the example on this page:
It works for me, however, when I try to edit all the spaces, it only edits the test page I created. So I'm not sure what I am doing wrong. This is the command I am running:
confluence --action runFromContentList --search "\"https://confluence.in.here.com\"" --space @all --common "--action modifyPage --id @pageId@ --findReplace \"https://wiki.ad.navteq.com/confluence#https://confluence.in.here.com\" --special \" #\" "
When I use the command to just "getContentList" it only returns the page I just created as a test as well as a different page in the same space:
C:\Users\lestrell\Desktop\atlassian-cli-3.8.0>confluenceprod --action getContent List --search "\"https://confluence.in.here.com\"" 2 results in list "Id","Type","Title","URL","Excerpt" "214302939","page","change","https://confluence.in.here.com/display/BSGS/change" ," ... aaa https://confluence.in.here.comá bbbb á ccc Testingá dddd" "113934408","page","html macro","https://confluence.in.here.com/display/BSGS/htm l+macro"," ... font color=""red"" size=""3""><strong>Wiki URL has changed to ""h ttps://confluence.in.here.com"". <a href=""https://confluence.in.here.com/displa y/HELP/Upgradeto5.5andMigrationtoaHERE.comURL""> Click here</a> for more informa tion.</strong></font> </center> <center ... "
So, I'm not sure what I am doing wrong. Can anyone help?
Search uses Confluence text search, so you can go to the UI and conduct the same search. See how many hits you get? I suspect you really want to find links that will be broken with the change. There probably isn't a way to subset pages that have the link. So, that means doing all pages.
No, it just means it will be slow doing the change for all pages. Perhaps do a space at a time. Same approach as before, but not using search. Instead, use runFromPageList with --space XXX. This will go through each page in the space and attempt the findReplace. If nothing is found, the page should not be updated (verify this on a few of your pages first if you like). It takes a lot longer since each page must be downloaded.
I've been trying to complete this same task with no results. It is basically the same step listed here as exmaple 1:
confluence.sh --action runFromPageList --space "RDAISC" --common "--action modifyPage --id @pageId@ --findReplace \"http://wiki.ad.navteq.com/confluence#http://confluencedev.in.here.com\" --special \" #\" "
The interesting thing is that I can get this to replace any normal text on a page, but it will not alter the URL in anchor tags. Any thoughts?
Take a look at an example page's storage format and verify the text matches your find string. Next simplify and run just against the example page and use --debug on the action and see if that helps you see what is going on. Open an issue if you have problems and provide the log.
Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time! We're looking for people to participate in a remote 1-hr workshop...
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!
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