This article explains how to export multiple spaces using Confluence Command Line Interface (CLI) with a single action.
Write an action with runFromCsv and exportSpace together to export multiple spaces. Please see the example action below:
--action runFromCsv --common "--action exportSpace" --file CLI.csv
This runs the exportSpace action with values from the CSV file and stores data of all spaces into separate zip files.
Export types are XML, HTML, PDF with XML being the default export type.