Thread "Migrating Ilias v5.4.13 to the current version"

Tabs

  • luggie91
    luggie91 | luggie91 | 6. Jul 2024, 11:18
    Migrating Ilias v5.4.13 to the current version

    Hi,

    My ilias installation is "a little" outdated (v5.4.13 which is no longer mantained) but full of users, roles, data, ...

    Since there is no upgrade wizard, I'm trying to ask straight forward how I can update my installation. I don't need a full instruction manual just some bullet points of the standard way of doing this.

    Should I install a fresh new ilias and try to migrate my old data into it? Is this even possible?

    When trying to pull a current (or some other like the 8th) release with git, the pull (respectivly chechkout to branch relase_8 or 9 works but when navigating to the domain, I get a WSOD.... fortunately, I'm working with a copy. Is this even how ilias works? What I did is just hard copy all ilias files from my working installation to another domain. Since both domains are on the same server, hard links to data, db and the like should work just as well right?

    Hope to hear from you
    Lukas

  • utesche
    utesche | utesche | 6. Jul 2024, 13:18
    Edited on: 6. Jul 2024, 13:35 - by utesche | utesche
    Re: Migrating Ilias v5.4.13 to the current version
    Hello Lukas,

    you should migrate your instance by single major-version-steps:
    5.4.13  -->   5.4.x (latest)  --> 6.x (latest) --> 7.x (latest)  --> 8.x (latest)

    This is essential to have the opportunity to execute all version specific migrations and updates to the database and the filesystem.
    Keep in focus,  that each major version has specific requirements (especially the supported PHP version!) for execution.
    The requirements are well documented in the feature wiki ( 5.4678 )

    The ILIAS code for versions 7.x and abvove are available in github, older versions can be downloaded here.

    Beginning at version 7 the installation is maintained by cmdline only - you have to deal with its syntax, its features and required ugrade actions from now on!
    You should execute all pending 'migrate' tasks before updating to the next major version - see 'README.md' in folder 'setup' of each version...

    Last but not least you have to migrate your plugins simultaneously. Also all major versions step by step.

    Migrating from 5.4.x to current 8 is quite a long way with enough pitfalls due to possible inconsistencies of your DB and filesystem,
    If you can afford the space, consider keeping a copy of each successful reached major version until your final instance works as desired (core, plugins, chatserver, ilserver, ...)

    Good luck,  we appreciate to hear a feedback from you!

    wbr,
    Uwe


    edit:
    I remember, there are some additional actions after/before upgrading to a new major version concerning certificates and system-/custom-styles - I don't have links by hand actually, sorry...
    If you're using custom layouts (skins): forget about them and build them new for version 8.  Reset all their uses to 'delos' before upgrading to version 6!
  • luggie91
    luggie91 | luggie91 | 6. Jul 2024, 19:19
    Edited on: 6. Jul 2024, 19:49 - by luggie91 | luggie91
    Re (2): Migrating Ilias v5.4.13 to the current version
    another approach that I tried:
    1. copy zipped installer of 5.4.13 to new domain (all preliminaries are met)
    2. follow setup
    3. create empty database (utf8)
    After I click "install database", I get a white screen
  • luggie91
    luggie91 | luggie91 | 6. Jul 2024, 19:49
    Re: Re (2): Migrating Ilias v5.4.13 to the current version
    omy first approach:
    1. copy ilias installation to another domain on the same server.
    2. copy iliasdata to the other domain.
    3. clone database.
    4. Navigating to the new domain shows that it works so far.
    5. connect copied installation to clones database . The only files that contain any database configurations where:
      • ilias/xml/data/Ilias/client.ini.php
      • ilias/data/Ilias/client.ini.php
    6. change all occurences of old domain with new domain.  The only file where I found these was:
      • ilias/xml/ilias.ini.php

    After step 5 and 6, the page is not available anymore: "The page isn’t redirecting properly"
    There is no log or inspect message.

    any ideas?

    (reverting step 5 and 6 and it works again)
  • luggie91
    luggie91 | luggie91 | 6. Jul 2024, 20:05
    Re (2): Migrating Ilias v5.4.13 to the current version
    another approach that I tried:
    1. copy zipped installer of 5.4.13 to new domain (all preliminaries are met)
    2. follow setup
    3. create empty database (utf8)
    4. dump database from working installation into empty database
    results in "The page isn’t redirecting properly"
  • luggie91
    luggie91 | luggie91 | 6. Jul 2024, 20:36
    Edited on: 6. Jul 2024, 20:48 - by luggie91 | luggie91
    Re (2): Migrating Ilias v5.4.13 to the current version
    another one:
    1. followed this steps: https://docu.ilias.de/ilias.php?baseClass=illmpresentationgui&cmd=layout&ref_id=367&obj_id=6489 with 5.4.26
    2. did the same with 5.4.13
    in both cases, after installation has status "OK" and login, error message "27d62_6593" occurs" and "The page isn’t redirecting properly"
  • utesche
    utesche | utesche | 7. Jul 2024, 05:42
    Re: Re (2): Migrating Ilias v5.4.13 to the current version
    Hello Lukas,

    when you get an error message like "27d62_6593" then you must look into this log file "27d62_6593.log" in your configured 'error message folder' for details of the cause(s)..
  • luggie91
    luggie91 | luggie91 | 15. Jul 2024, 10:16
    Re (2): Re (2): Migrating Ilias v5.4.13 to the current version
    In the meantime, I was able to proceed with my endless updateing quest to version 6.24. Everything works in principale except for the named button labels, that are very often shown as palceholders like this:


    anyone with an idea, concerning this?
  • fschmid
    fschmid | fschmid | 16. Jul 2024, 08:40
    Re: Re (2): Re (2): Migrating Ilias v5.4.13 to the current version
    Hi luggie91

    it just looks like the languages are not updated. can you try going to "mm_administration" > "Maintenance" > "Languages" and update all relevant languages there?

    otherwise i think you could simply continue with updates to 7, 8, 9... the languages should actually be updated as part of the updates. if not: do you have your own language files in customizing/global/long? otherwise remove them first before updating the languages, maybe something is wrong with them.

    either way, the path from 5.4 to 9 is of course a long one, but it's great that you're taking it. as long as you do it in an environment where you can fall back on backups in case of errors, nothing bad can happen, except that you have to go back one step.
  • luggie91
    luggie91 | luggie91 | 17. Jul 2024, 17:37
    Re (2): Re (2): Re (2): Migrating Ilias v5.4.13 to the current version

    Thanks so far!

    Finally managed to reach version 7.

    I just realized that all PDFs, Images and Videos that were embedded into the courses and pages are missing.

    I expected that some things would be missing on such a huge leap but I do have an annoyingly vast number of those files in my courses which would add up to an enourmous amount of work to pull up all by hand. What could be an approach to tackle this?

  • utesche
    utesche | utesche | 17. Jul 2024, 18:08
    Re: Re (2): Re (2): Re (2): Migrating Ilias v5.4.13 to the current version
    As essential part of an upgrade to ILIAS 7 all files have to be transferred to IRSS,  see: https://docu.ilias.de/goto_docu_wiki_wpage_6282_1357.html 
    Didi you perform this migration (by CLI) ?
  • luggie91
    luggie91 | luggie91 | 19. Jul 2024, 12:04
    Re (2): Re (2): Re (2): Re (2): Migrating Ilias v5.4.13 to the current version
    After having tried a lot of things, I ended up doing the most straightforward thing: Installing ILIAS anew and copy/pasting all db/files, which worked for version 7 but not for 8 or 9. Here is what I did:
    1. clone ILIAS from git
    2. checkout at release_7
    3. clone ilias database
    4. composer install --no-dev and; install --omit=dev --ignore-scripts; npm audit fix
    5. set up appropriate install-config.json and php setup with it
    6. disable no longer working old plugins in il_plugin in database

    which worked except for the missing files.

    I noticed, that I will propably stay at version 7 for now, because this is the latest version that is compatibly with php versions that other software on the server is relying on.

    I will try IRSS the week after next week and let you know, how it works

  • luggie91
    luggie91 | luggie91 | 1. Aug 2024, 10:34
    Re (2): Re (2): Re (2): Re (2): Migrating Ilias v5.4.13 to the current version
    I did not yet fully understand, when to run this? Before, during or after the installation of Ilias 7 (see my last post, how I did this).
    When running php setup/cli.php migrate, I get the following:


    Trigger migrations in ILIAS
    ===========================

     ! [NOTE] There are 3 to run:                                                                                           

     ilFileObjectMigrationAgent.ilFileObjectToStorageMigration: Migration of File-Objects to Storage service [remaining steps: 382]
     resourcestorage.ilStorageHandlerV1Migration: ilStorageHandlerV1Migration [done]
     ilStudyProgrammeMigrationAgent.PRGUpdateCRSRefLPSettingMigration: Update LP Settings of Course References [done]

     ! [NOTE] Run them by passing --run <migration_id>, e.g. --run                                                          
     !        ilStudyProgrammeMigrationAgent.PRGUpdateCRSRefLPSettingMigration
  • utesche
    utesche | utesche | 1. Aug 2024, 12:35
    Re: Re (2): Re (2): Re (2): Re (2): Migrating Ilias v5.4.13 to the current version
    Hello Lukas,

    the migrations are to be run as soon as they are accessible AND there are still objects to be migrated.
    This is the case for te first one ('ilFileObjectMigrationAgent.ilFileObjectToStorageMigration')  - there are still 382 objects that need migration.  The two other migrations have nothing to do currently,  this is indicated by:  "[done]".

    wbr,
    Uwe.
  • luggie91
    luggie91 | luggie91 | 12. Aug 2024, 09:08
    Re (2): Re (2): Re (2): Re (2): Re (2): Migrating Ilias v5.4.13 to the current version
    Hi Uwe,
    I run all three migrations (some I needed to run multiple times until they were finished, before I understood that I could use --steps to speed things up).
    However I did not notice any changes in ilias.
    There are still many files missing or other files that stated, that they would need to be migrated now have 0 bytes:
    File "storage/fsv2/8c1/63c/3c9/84444a1838bd7f8b3642588/0/data" not found.
    PDFs, pictures or other media that are embedded in courses still only show the broken link symbol.

    Do I need to flush or apply the migration still somehow?
  • utesche
    utesche | utesche | 12. Aug 2024, 16:18
    missing files after ILIAS-7' file migration

    Hi Lukas,

    sorry dude - at this point there is no magic button, function or procedure left to fix your remaining problems.
    If you REALLY strive to regain as much files as possible you have to analyse file by file, what's the problem in every single case.
    AND you need some knowledge of the db structures concerning the file object !

    Some years ago, I migrated a very old installation (started in 2003 with ILIAS 3) from ILIAS 6 to 7 including the file migration from ilFile to IRSS.  And I encountered a great variety of problems with files
    some issues from that period:
    - https://mantis.ilias.de/view.php?id=30930
    - https://mantis.ilias.de/view.php?id=31730

    The reason for a not migrated file may be:
    (collected from my brains' memory..., unsorted, no meaning of no of cases, 'original file' means: old file until ILIAS 6)
    - problematic characters in the original filename, causing the migration not to be able to read or delete the original file
    - inconsictencies in versioning (in old ilFile)
    - original file has length of ZERO bytes
    - original file doesn't exist either
    - inconsistencies in behalf of files with blacklisted fileextensions (due to bugs, crashes or  ...) - resulting in existing original files in filesystem not matching the expected filename in db
    - non matching original filename in db with orogonal filename in filesystem

    At that time I spend a lot of time to understand the problem of EVERY file not migrated as expected during that migration, even for those files not even mentioned in the migration log (see below).

    The migration process writes a log file during migration:
    [DATA_DIR]/ilFile/migration_log.csv

    There you should
    begin your examination of 'missing files'.
    You may also take a look at my post in this thread: https://docu.ilias.de/go/frm/1875/_7690

    wbr,
    Uwe

  • luggie91
    luggie91 | luggie91 | 13. Aug 2024, 09:30
    Re: missing files after ILIAS-7' file migration

    Hi Uwe,

    I still think (and hope, because this seems like a lot of work :D) that I did something wrong while migrating since my iliasdata/myilias/ilFile/migration_log.csv is empty

    Recapturing that all 380 files where processed by the migration php script but all this really did was to change the files' behaviour from telling me that they are not yet migrated and that one should contact an administrator to that they exists but with 0 bytes and cannot be found - so in fact, after comparing what happend to my old installation, no file was actually migrated and therefore my log is empty. However, like I said, after the migration process all 3 steps are [done]

    Also: I cannot open the link you posted to that old post of yours. It just forwards to the forum's main page. This also the case when I try to save this thread to a bookmark in my browser.

  • utesche
    utesche | utesche | 13. Aug 2024, 10:25
    Re(2): missing files after ILIAS-7' file migration

    ... strangely an additional slash found its way into the link, hmm?    You discovered a bug!

    The correct link is   https://docu.ilias.de/go/frm/1875_7690
    If you open it and inspect the "Permant Link" in the footer - you can see the misplaced additional slash!

    NO file was transferred physically to IRSS, but all files are marked as processed (Status:  [done])  - that's weird.
    The migration log exists, but it is empty, right?
    Did you surely execute the migration as the same user which runs the PHP processor (and has therefore all necessary access rights)?

  • luggie91
    luggie91 | luggie91 | 18. Aug 2024, 13:30
    Re(3): missing files after ILIAS-7' file migration

    What do you mean by "additional slash"? The /myilias folder? This is what I set up on install. When I remove it, migration complains, that it cannot find the path. With it, it finds everything.

    Thanks for the link, I read through it.

    I experience the exact same problem as the op in this thread.

    However I am running the php command to migrate with the same user, who is owning the storage folder. Running php is not the problem, neither is writing into storage folder. I however do not have sudo rights on the server, which should not be a problem as long as I am the user, owning storage (and all other folders there) as well as, as I have sufficient rights to run php right?

    Yes, all migrations are marked as [done], migration_log.csv is empty and so is storage/fsv2. All the files are still there in ilFile

  • utesche
    utesche | utesche | 18. Aug 2024, 17:10
    Edited on: 18. Aug 2024, 17:28 - by utesche | utesche
    Re(4): missing files after ILIAS-7' file migration

    ... the "additional slash" concerns the link generated by THIS ILIAS instance (docu.ilias.de) !   Look at the "Permanent Link" in the footer of this page -   it should end with "../1875_8953"   but it ends with  "../1875/_8953"  !

    When all your files still reside in ilFile   AND   storage/fsv2 is empty   AND   the file migration indicates "[done]" -  then something weird has happened.. 

    I suggest to re-indicated your files to be mentioned by the file migration by resetting the IRSS-references for each concerned file:

    SQL>   update file_data set rid = '' where rid <> '';

    and perform the file migration again.



    Edit:

    "issue for the slash":  https://mantis.ilias.de/view.php?id=41920

  • luggie91
    luggie91 | luggie91 | 24. Aug 2024, 09:44
    Re(5): missing files after ILIAS-7' file migration

    Hi Uwe,
    thanks for clarifing.
    I did not yet fully understand how to re-indicate all thise files, meaning I did not understand the syntax of the sql command you posted. Could you make an example for a file?

    All these files are 400-500, handling each one individually seems liek a lot of work.
    Is there a way to loop through them reindicate them?

  • utesche
    utesche | utesche | 25. Aug 2024, 09:35
    Re(6): missing files after ILIAS-7' file migration

    Hello Lukas,

    the posted SQL resets all files to the state before the first processing of ilFileObjectMigrationAgent .
    The table [file_data] holds data about the files of the concerned ILIAS instance.  The column [file_data].rid was added by updating your instance from 6.x to 7.x .  The column acts as reference to the new file storage introduced with ILIAS 7.
    If this column is empty (contains an empty string) for a file entry, then this entry will be mentioned for the file migration (ilFileObjectMigrationAgent).

    If you want to try it for just ONE file, then you can set the rid for ONE file entry only.  I can't provide an exact SQL for your instance, because I can't guess what file_id's your files got.  Assuming the file has id 4711, the resetting-SQL for this file would be:

    SQL>   update file_data set rid = '' where file_id = 4711;

    Then perform "php setup/cli.php migrate"  -  you should notice that ONE file must be migrated now.

    wbr,
    Uwe

  • luggie91
    luggie91 | luggie91 | 25. Aug 2024, 13:12
    Re(7): missing files after ILIAS-7' file migration

    Nice!

    After retrying, the migration now worked! That includes all files, that were content of courses.

    The only thing that still missing is files (especially images) that were content of pages. These links are broken

    Old Ilias (Backup):

    New Ilias, after update and migration (on test server):

    Here, you can see, that their links were not updates or migrated. They point to ./data/myilias/mobs/... my folder structure is: iliasdata/myilias/ in which folder mobs does not exist. I guess /data is an alias for my custom folder called /iliasdata right?

  • utesche
    utesche | utesche | 25. Aug 2024, 15:56
    Edited on: 25. Aug 2024, 15:57 - by utesche | utesche
    Re(8): missing files after ILIAS-7' file migration

    Hello Lukas,

    /data is NOT an alias for /iliasdata.

    /data is the (so called) extern data folder, wich contains several "implicit" created files for ILIAS - the folder './data/mobs/ e.g. holds 'Media Objects' for page customizations.  Its usage and content is NOT tempered by an upgrade from ILIAS 6 to ILIAS 7!!   If it misses content "now", imo it should be missed before in ILIAS 6 too...

    Your last screenshot shows,  that 'myilias' is the client name of your ILIAS instance - so the path to the 'missing' jpg is an relative path inside your ILIAS' codebase folder.  Looks all right.

    With ILIAS 7 only(!) files that are 'Repository File Objects' (managed by table [file_data]) are migrated to IRSS.  Other files, such as usr_images are migrated in later major ILIAS versions.  It's an ongoing process to migrate files and other filebased stuff to IRSS.


    Can you confirm whether or not the mountains-5485366.jpg physically EXISTS in the former ILIAS 6 instance?

  • luggie91
    luggie91 | luggie91 | 25. Aug 2024, 16:30
    Edited on: 25. Aug 2024, 16:31 - by luggie91 | luggie91
    Re(9): missing files after ILIAS-7' file migration

    I see ...

    the link in my old Ilias installation (actually it's ilias 5) looks like this and is found:



    Running grep -r mountains-5485366.jpg inside iliasdata shows:

    ./log/log:[aa6f5] [2021-05-05 12:46:46.401290] Ilias_root.INFO: ilObject::create:454 ilObject::create(), finished, obj_id: 2870, type: mob, title: mountains-5485366.jpg  

    find .   -name "mountains-5485366.jpg" does not find anything.

    The image on the website is displayed

  • utesche
    utesche | utesche | 25. Aug 2024, 17:33
    Re(10): missing files after ILIAS-7' file migration

    Obviously your current ILIAS 7 instance is NOT created by upgrading :  ILIAS 5.x  >>   ILIAS 6.x   >>  ILIAS 7.x,  right?

    This can be said, because the client names differ!  
    old (ILIAS 5) :   ./data/Ilias/...
    new (ILIAS 7):   ./data/myIlias/...

    Client names can not be changed by simple renaming!

  • luggie91
    luggie91 | luggie91 | 27. Aug 2024, 19:39
    Re(11): missing files after ILIAS-7' file migration

    yes, you are right. I just cloned the git repo, cloned the db and went through some config steps to get to version 7 (like I wrote on 19. Jul 2024, 12:04 ). I did this because I could not get any further from v6 to v7 on the standard upgrade steps (I must say, that I forgot why this was the case. Please excuse me on that matter, this whole process is going on for some moths now already)

    I did this now all over again with my client called Ilias (like before). However sadly the pictures are still not showing up.

    I hard copied data/Ilias/mobs to the new installation from the old which worked!

  • utesche
    utesche | utesche | 27. Aug 2024, 20:24
    Re(12): missing files after ILIAS-7' file migration
    Hmm,  did you check the target's permissions after recent hardcopy?
  • luggie91
    luggie91 | luggie91 | 28. Aug 2024, 12:32
    Re(13): missing files after ILIAS-7' file migration
    What do you mean exactly?
    ilias, data, Ilias, mob and subfolders all have 755 (drwxr-xr-x) octal rights and are all subject to the same user as owns the installation and is hosting the webserver.
  • utesche
    utesche | utesche | 28. Aug 2024, 14:21
    Re(14): missing files after ILIAS-7' file migration
    Yes, that was meant. 
    You wrote you manually copied folder mobs,  so inaccurate permissions on that folder was my last guess what could cause the pics not to be shown..