Individual space exports of all spaces
Asked by biwerr:

I'd like to export all spaces, because i had to move spaces to a new system. A site migration is not possible.

I've found a KB Article for that, but i don't know how to get / find the tools used in this article.

AtlassianApps/SupportTools/confluence-cli-4.4.0/confluence.sh  
AtlassianApps/SupportTools/confluence-cli-4.4.0/backup

Where can i find the AtlassianApps Support Tools, with the confluence.sh

<https://confluence.atlassian.com/confkb/how-do-i-create-individual-space-exports-of-all-spaces-via-the-command-line-interface-777020086.html>


Answers:
author: Ravya
body: Hi [@biwerr](/t5/user/viewprofilepage/user-id/563998) ,

Good day, I am Ravya Mutyala from the Bobswift support team. We have created a support request <https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-7255> to better track your request. However, we couldn't add you as a reporter. Please sign up using this link <https://bobswift.atlassian.net/servicedesk/customer/portal/1/user/signup> and share the user name/id. We'll then add you as the reporter and confirm.

The article which you are referring to is an old one, and now Bobswifts Command Line interface has gone several updates making it simpler to use. You can install the latest compatible version of CLI on your Confluence instance by referring to the following link:  
<https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli/version-history>

Once you install Bobswifts CLI on your confluence instance, you can install the CLI client by referring to the following link:  
<https://bobswift.atlassian.net/wiki/spaces/ACLI/pages/98009238/CLI+Client+Installation+and+Use>

After installing CLI you can use the exportSpace action along with runFromCsv to export spaces from your source instance:

{code:java}  
--action runFromCsv --common "--action exportSpace" --file CLI.csv  
{code}

<br />

You can refer to the following link for detailed steps by step guide for exporting space:  
<https://bobswift.atlassian.net/wiki/spaces/SUPPORT/pages/991527382/How+to+export+multiple+spaces+using+Confluence+Command+Line+Interface+CLI>

<br />

Now for your target instance use the restoreExport along with runFromCsv action to import the file:

{code:java}  
--action runFromCsv --file restore.csv --common "--action restoreExport "  
{code}

Step by step guide for restoreExport for multiple spaces is available at the following link:  
<https://bobswift.atlassian.net/wiki/spaces/SUPPORT/pages/1247511532/How+to+import+multiple+spaces+using+Confluence+Command+Line+Interface+CLI>

If you want to export the site then you can use the _exportSite_ and _restoreExport_ actions, when you have an empty target instance.  
You can refer to the below link to know about the _exportSite_ parameters: <https://bobswift.atlassian.net/wiki/spaces/CSOAP/pages/1068403782/exportSite>

Please try performing the action on your test environment before performing it on your production.

If you have any further queries please let us know, we are happy to help.

Regards,  
Ravya

comments: author: biwerr
body: Thank you for the detailed answer with code examples. I'll try it in our dev environment. :-)


author: Ravya
body: Hi [@biwerr](/t5/user/viewprofilepage/user-id/563998),  

Sure, please try and let us know if you have any further queries. Please feel free to sign up for our support portal using this link <https://bobswift.atlassian.net/servicedesk/customer/portal/1/user/signup>

And once you signup share us your user name/id. We'll then add you as the reporter for <https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-7255> and confirm.

Regards,  
Ravya


author: Ollie Guan
body: Hi [@biwerr](/t5/user/viewprofilepage/user-id/563998) ,

[Confluence Command Line Interface (CLI)](https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli) {#toc-hId--1241830544}
--------------------------------------------------------------------------------------------------------------------------------------------------


Tags: confluence-server

export

migration

server