Copy a page tree
Reuse a project template or duplicate a whole section in one command. cp -r copies a page and all of its descendants under another page in the same space.
1. Look at the tree
Section titled “1. Look at the tree”$ tree ./Templates/Project -L 32. Preview, then copy
Section titled “2. Preview, then copy”$ cp -r -n ./Templates/Project ./Projects$ cp -r -y ./Templates/Project ./ProjectsThe preview shows how many pages would be copied. -y starts the copy. The destination (./Projects) must already exist.
3. Choose the title prefix
Section titled “3. Choose the title prefix”Every copied page gets a prefix so titles don’t clash. The default is Copy of . Set your own:
$ cp -r -y --prefix 'Client B - ' ./Templates/Project ./ProjectsWhat is copied
Section titled “What is copied”Shell uses Confluence’s page-hierarchy copy: pages, attachments, labels, and page restrictions are copied.
Limits
Section titled “Limits”- Same space only. One source per run.
- At most 200 pages in the source tree — copy large trees subtree by subtree.
- No pipes and no multiple sources with
-r. - Folders and spaces can’t be copied.
- The copy runs as a Confluence background task. If Shell stops waiting, the copy may still finish — check in Confluence.
To copy a few individual pages (not a tree), use plain cp, globs, or find … | cp DEST (max 100).