I had a page get corrupted and had to hard delete it from the database. I copied it before I did and wish to have its children moved to the copy. I ran the following SQL but it did not seem to change the heirarchy or have the new space home list the children:
update confancestors set ancestorid=74842628 where ancestorid=442;
Any idea how to accomplis this?
You could perhaps try out the Confluence CLI in Atlassian CLI.
Get a list of child pages for a page:
confluence --action getPageList --space "zconfluencecli" --title "Current Parent Page" --children
Then move each page in the list to a new parent...
confluence --action movePage --space "zconfluencecli" --title "This Child Page" --parent "New Parent Page"
It could be turned into a nice little bash script e.g.
move-page-children "Current Parent Page" "New Parent Page"
This looks promising but what about the fact that their parent page no longer exists?
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.
I was able to get this working using the --outputFormat 2 for getPagelist and not supplying a title. I took all of the items (except the new home) with a parent id of 0 and used them to make the list. Thanks so much!
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.