If you’re moving or syncing spaces between separate Confluence instances, you may need to delete spaces so that they can be reimported. If you’ve tried this, you know that space deletion is a long-running process that can take literally hours and sometimes fails.
The most efficient way I’ve found to delete a space is to leverage the Replace feature of Import Word Document to dump the space contents before trying to delete the space. Doing this trick makes space deletion almost instantaneous.
- Start with a heading-free Word file, for uploading to Confluence: Download Confluence-dummy-import-docx
- Use it to replace the hierarchical contents of the space:
- Go to the home page of the target space (first link of breadcrumbs).
- Select … > Import Word Document.
- Browse to the DOCX you downloaded (or any DOCX but do not split by Heading).
- For Where to import, select Replace <space-name> Home and enable Delete existing children…
- Click Import.
- Delete the Trash:
- Go to Space Tools > Content Tools, Trash.
- Select Purge All, to flush the old space contents.
- Delete the space:
- Space Tools > Overview, Delete Space.
- Import the space:
- In source Confluence, create the XML space export (ZIP): Space Tools > Content Tools, Export, XML.
- Click the download link.
- In target Confluence, go to Administration (gear) > General configuration, Administration, Backup & Restore
- For Upload and restore a site/space backup, browse to the downloaded ZIP.
Hope this helps!