Confluence supports multiple export file type for a Space via the Web interface. This is handy if you only need export a single space. But what if you need to export a large number of spaces? For example, offline archive the inactive users’ personal spaces. I assume it will take you quite some time to get it done.
To make it a little bit easier, I wrote a command line called ‘Confluence Space Exporter’. This is how it looks like:
$ confluence-space-exporter -k CAP -t xml Generating export file for space CAP ... CAP space archiving file download link: https://confluence.jackiechen.org/download/temp/Confluence-space-export-221847-204.xml.zip CAP space download starting time: 2019-10-17 10:18:47 Downloading... status code is: 200 CAP space export file size: 0.01 MB 100.00 % has been downloaded for CAP CAP space download finished! confluence.jackiechen.org-CAP-Confluence_Automation_Poc.xml.zip CAP space download ending time: 2019-10-17 10:18:48
Please check it out if you are interested: https://www.npmjs.com/package/confluence-space-exporter