Skip to content

archive

FunctionSends pages to the Confluence native archive (not the trash). Archived pages leave search and listings and stay restorable in Confluence.
Options-y, --yes — required. -n, --dry-run — preview without archiving.
LimitationsStandard plan or above — not available on Confluence Free. Pages are archived one at a time, so 100 pages can take a few minutes. At most 100 targets. PATH is required (the current directory is not a default). Spaces and folders can’t be archived. No unarchive — restore archived pages in Confluence.

If the site’s plan does not allow archiving, Shell stops and suggests a same-space move instead (find … | mv ./Archive).

Shell submits one archive request per page, in order, because Confluence runs one archive job per site at a time. Press Esc or Ctrl+C to stop; a page that was already submitted may still finish on the server. Whether child pages are archived together with their parent is decided by Confluence — check the result in Confluence. Duplicate paths are archived once.

With a pipe, stdin is a list of page paths (one per line, as from a bare find). Only flags go on the command line. Do not pipe find -ls or find --format csv output into archive.

$ archive -n ./Old-runbook
$ archive -y ./Old-runbook
$ find ./MySpace -mtime +730 -prune | archive -n
$ find ./MySpace -mtime +730 -prune | archive -y
$ find -label obsolete | archive -n

Recipe: Archive stale pages.