Hello,
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:
https://bobswift.atlassian.net/wiki/display/CSOAP/How+to+globally+search+and+modify+content
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.
OK, when I go to the UI I only get one page result as well. Yes, I wanted to udpated any broken link that was in any and all pages...I guess that is not possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great, thank you so much for your help Bob. I appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been trying to complete this same task with no results. It is basically the same step listed here as exmaple 1:
https://bobswift.atlassian.net/wiki/display/CSOAP/How+to+globally+search+and+modify+content
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.