I am searching for CLI tool or way using CLI to automate the export of one space or many spaces from my confluence cloud instance into .xml so i can back it up or import into another instance
I’d like to automate this on a schedule (e.g. every night) using a script or integration.
My goal is to regularly back up either the entire space or a specific space/page tree without having to manually initiate the export through the Confluence UI.
Hello @Radoslav Yordanov
While there are few request from atlassian to create a feature for space exports but they are currently in gathering interest phase https://jira.atlassian.com/browse/CONFCLOUD-40457 https://jira.atlassian.com/browse/CONFCLOUD-37995
My suggesstion:
Confluence Cloud doesnot support fully supported REST API endpoint to trigger XM space export, we are left with CLI automation option
Use the Confluence Command Line Interface available in Atlassian Marketplace by appfire
Below is an example of sample script
#!/bin/bash # Use the CLI tool (command will vary based on the specific tool) # Add error handling and log creation here |
Let me know if you need any other help, We also provide freelancing support for the same.
Thanks
Hi @Radoslav Yordanov ,
You might want to check this open suggestion (and workarounds listed there): CONFCLOUD-40457: Add REST API endpoint for generating space exports
This other one is also relatively relevant to what you're looking for: CONFCLOUD-37995: Ability to schedule space exports to HTML, XML, or PDF
Basically, no out-of-the-box solutions are currently out there, but you might want to try these:
1. The Confluence CLI provides such functionality, but it is a paid third-party add-on. The above functionality would be important to automate migration/backup tasks for administrators.
2. Use the atlassian-python-api library, which provides a method called get_space_export in the confluence.py module. This method allows you to trigger space exports through REST API requests. Please note that this library is community-maintained and is not officially supported by Atlassian
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.