How to import multiple spaces using Confluence Command Line Interface (CLI)

This article explains how to import multiple spaces using Confluence Command Line Interface (CLI) with a single action.


  1. Create a CSV file with file as column name which must contain the file names of exported spaces:
  2. Combine runFromCsv, with the --file parameter, and restoreExport to import multiple spaces. This example works based on the contents of the CSV file that is required for the restoreExport action with relevant parameters.

    --action runFromCsv --file restore.csv  --common "--action restoreExport "
  • Additionally, --noIndex parameter can be used to avoid content re-indexing after restore.
  • Only XML export type file can be restored with the restoreExport action.
  • Place the zip files in /home/restore directory for the restoreExport action.
  • It is recommended to test this scenario in a non-production environment, or run the action with the --simulate parameter, to verify the behavior before deploying on a production environment.