Sidehistorik
TO:DOs
- Make draw.io to SVG work on Linux
- Test xwiki.cfg - xwiki.store.versioning=0 to prevent page versions for tagging etc
- Set created date/time on Blogposts (not only publised date) - SQL Seems to be the way
- Set created date/time on pages (less important) - SQL Seems to be the way
- Improve logging from convert.py a bit
- Limit access to User Index (a personal need)
- Implement robots.txt in docker
- Disable public user Registration
...
This can vary a bit - but for my migration scripts, these may be needed as they do substitute several Confluence Macro's:
- Blog Application (May be installed from the primary install) https://extensions.xwiki.org/xwiki/bin/view/Extension/Blog%20Application/
- Attachments Macro
- Video MacroEmbed Macro https://extensions.xwiki.org/xwiki/bin/view/Extension/Embed%20macro/ (installed via Import in the Administration section)
- Diagram Application
- PDF Viewer Macro
- Youtube Macro
...
Create the config.py file:
| Kodeblok |
|---|
confluence_username = '' confluence_password = '' conflunceconfluence_url = 'https://www.server.dk' confluence_members_group = 'confluence-users' xwiki_username = '' xwiki_password = '' xwiki_url = 'https://xwiki.server.dk' #The first created user under installation xwiki_admin_username = 'admin' #Skip blog and pages with restrictions - good for test env. skip_restricted_content = False #Spaces to migrate in Confluence - Capital and lower cases can be tricky #Pages on same level as Home page is not migrated, only the tree structure from Home space_keys = ["key1","key2","key3"] #Start on the XWiki - the import will start from here wiki_space = "Main" # XWiki Home #wiki_space = "Sandbox" # XWki Sandbox #Create users and groups create_users = True create_groups = True # Blogposts blog_start_at = 0 blog_max_limit = 100 blog_max_count = 2000 # Bug as the Atlassian API does not return a size of the total number. Set this number high #Diagram Application - None, Free or Pro diagram_app_type = "Free" #OSType (for Draw.io CLI) - macos, linux os_type = "macos" #Logging persist_log_to_file = True #Stop on Error stop_on_error = True #Debug log_urls = False log_xml = False #Database. Requires port 5432 access to the Database skip_database_update = False xwiki_database_host = "xwiki.server.dk" xwiki_database_name = "xwiki" xwiki_database_user = "xwiki" xwiki_database_password = "" xwiki_database_port = "5432" |
Edit the confluence.py file and add all space keys You wish to migrate to XWiki:
...
| Kodeblok |
|---|
python3 confluence.py > log.txt |
Post migration
Run SQLsIf skip_database_update = False then You need to apply the 2 SQL's afterwards:
| Kodeblok |
|---|
sudo apt-get install -y postgresql-client-16 psql -U xwiki -h localhost -d xwiki < pages.sql psql -U xwiki -h localhost -d xwiki < blogs.sql |
...
You may want to style Xwiki, I do a different Theme and a little CSS:
...
LESS:
XWIKI LESS Code for www.mos.-eisley.dk
...
Other
Disable Registration in the Amin UI (If You want to)
...