A command line tool to migrate documents from one Confluence instance to another.
- Update an existing page in your destination Confluence with content from a page in source confluence
- Copy a document from your source Confluence to destination Confluence
- Create a new page in your destination Confluence
- Copy entire space from source Confluence to destination Confluence
Confluence Copier requires Python 3+ to run.
- Download the source code to your local machine where Python is installed.
- Install requirements from the
requirements.txtusingpip install -r requirements.txt. - Rename
.env.exampleto.envand update your source and destination Confluence credentials. - Obtain a token here: https://id.atlassian.com/manage-profile/security/api-tokens. Make sure to generate a token each for your source and destination Confluence and update it accordingly in the
.envfile.
SOURCE_CONFLUENCE_LINK="https://domain.net/wiki/rest/api/"
SOURCE_CONFLUENCE_USERNAME="<email>"
SOURCE_CONFLUENCE_API_TOKEN="<token>"
DESTINATION_CONFLUENCE_LINK="https://domain.net/wiki/rest/api/"
DESTINATION_CONFLUENCE_USERNAME="<email>"
DESTINATION_CONFLUENCE_API_TOKEN="<token>"| Command | Details |
|---|---|
copy-page |
Copy page from source Confluence to destination Confluence |
copy-space |
Copy entire space from source Confluence to destination Confluence [In Development] |
create-new-page |
Create a new page in destination Confluence. |
update-page |
Update an existing page in destination Confluence with content from a page in source Confluence |
Copy page from source Confluence to destination Confluence
Usage:
python main.py copy-page --source-id="<source document id>" --parent-id="<destination parent document id>" --destination-space-key="<destination space key>" --new-doc-title="<new optional title>"Options:
| Option Name | Data Type | Details |
|---|---|---|
--source-id |
TEXT | Page id in source Confluence. [required] |
--destination-space-key |
TEXT | Space key in destination Confluence. [required] |
--parent-id |
INTEGER | Parent document id in destination Confluence. Pass -1 to create new document at root level of the space [required] |
--new-doc-title |
TEXT | New doc name in destination Confluence. [Optional, uses the same name of the source document if not passed] |
Example 1
python main.py copy-page --source-id="123414" --parent-id="12312423" --destination-space-key="TEST"Example 2
python main.py copy-page --source-id="123414" --parent-id="12312423" --destination-space-key="TEST" --new-doc-title="test-name"MIT
Free Software, Hell Yeah!

