Copy Page Tree
Using Copy Page Tree, you can copy all pages within a page tree, that is a page and all of its children, to another space or to the same space. When copying you can rename pages or add a prefix to copied pages.
To use this feature, you must have View permissions on all the pages you are copying and Edit permission in the space that you are copying the page tree to.
Run the script
To use this script, follow these steps:
Select the space where the page tree is currently located for Source Space.
Specify the page tree that you wish to copy in Select a Space.
Select the space you want to copy the page tree to Target Space.
Add a Prefix to be added to the copied pages.
Specify the part or whole page name you wish to transform in the Search and Replace boxes.
If your Target Space is the space where the page tree originated, you must add a prefix or rename the pages since Confluence does not allow pages to have the same name in the same space.
Links and image links within the tree of pages you are copying will automatically be updated to reflect any new page titles.
After selecting Run, the results appear and let you know how long the copy took.
Copy page tree to have a larger demonstration space
If you have a client demonstration space and want to copy a page tree to have more content in your space, follow these steps:
- For Source Space, enter the name of the space you want pages copied from. For this example, Client Demonstration for CQL (CQLDS).
- For Select a Space, select the page trees you want to copy. For this example, the two demo sections.
- For Target Space, select the space you want to copy the page tress to. For this example, we are copying to the same space.
- Select a Parent Page to Copy To. For this example, we chose the main page tree.
- Enter Copy in Prefix to indicate that the copied pages are copies.
- Select Run.
To use Search and Replace, enter the words into the field. Search is the field for the word you want to remove, and Replace is for the new word you want to use. For example, you could replace Demo with Demonstration by filling out the fields like this:
Once your script runs, the pages should be copied. Here is what the copied pages will look like in the Confluence space: