Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

TO:DOs

  • Make draw.io to SVG work on Linux (afkryds) 
  • 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 (afkryds) 
  • Set  created date/time on pages (less important) - SQL Seems to be the way (afkryds) 
  • Improve logging from convert.py a bit (afkryds) 
  • Limit access to User Index (a personal need) (afkryds) 
  • Implement robots.txt in docker (afkryds) 
  • Disable public user Registration (afkryds) 

...

This can vary a bit - but for my migration scripts, these may be needed as they do substitute several Confluence Macro's:

...

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

psql -U xwiki -h localhost -d xwiki < pages.sql
psql -U xwiki -h localhost -d xwiki < blogs.sql

Do a visual compare.

Examine log.txt for:

  • Errors
  • Pages with restrictions - these are unrestricted in the XWiki, do set restrictions if needed. Use grep:
  • Kodeblok
    cat log.txt | grep restrictons
    Read restrictons for user: bnp@mos-eisley.dk on Page: Kamerarer (61112322)
    Read restrictons for user: noreply@mos-eisley.dk on Page: Kamerarer (61112322)
    Read restrictons for group: familie on Page: 2 x 40 års fødselsdag (38600797)
    Read restrictons for user: bnp@mos-eisley.dk on Page: Christophers Nonfirmation 28-04-2018 (82182177)
    Read restrictons for user: noreply@mos-eisley.dk on Page: Christophers Nonfirmation 28-04-2018 (82182177)
    Update restrictons for user: bnp@mos-eisley.dk on Page: Christophers Nonfirmation 28-04-2018 (82182177)
    Read restrictons for user: bnp@mos-eisley.dk on Page: Sommerferie 2015 (59408386)
    Read restrictons for user: bnp@mos-eisley.dk on Page: Road Trip Sommerferie 2025 (272629841)
    
    

for Errors.

In things went wrong, roll back to the backup.

Reindex:

Image Added

Style

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)

...