Thread "After update from v6 to v7 -> Files are not yet migrated (not_yet_migrated)"

Tabs

  • Deleted
    Deleted | 7. Jul 2021, 16:28
    After update from v6 to v7 -> Files are not yet migrated (not_yet_migrated)
    Hello,

    I recently did the update from v6 to v7. Everything worked great so far. Only one thing is missing. All files have the hint:

    This file object has not yet been migrated and no new versions can be created. Please contact the administrators of the platform.

    (German: "Dieses Datei-Objekt wurde noch nicht migriert und es können keine neue Versionen angelegt werden. Wenden Sie sich an die Administratoren der Plattform.")

    Do I need to run the migration manually to fix the file records in the database? Which command to I need to call?

    Thanks in advance!

    Bye The_Unknown
  • wolfganghuebsch
    wolfganghuebsch | wolfganghuebsch (Moderation) | 7. Jul 2021, 17:35
    2
    Maybe this helps?

    • cd /var/www/html/ilias
    • php setup/setup.php migrate
  • Deleted
    Deleted | 7. Jul 2021, 18:06
    Edited on: 7. Jul 2021, 18:07 - by Deleted
    Re: 2
    Yeah, that seemed to have done the trick :) Big thanks!

    I needed to use the steps argument and set it to 100 in order to not having to run the command hundreds of times ;)

    php setup/setup.php migrate --run ilFileObjectMigrationAgent.ilFileObjectToStorageMigration --steps="100"
  • mkunkel
    Matthias Kunkel | mkunkel (Moderation) | 8. Jul 2021, 11:50
    Re (2): 2
    Thanks to Wolfgang for posting the necessary command.

    All necessary and supported commands are listed in the README for the setup, see here for example https://github.com/ILIAS-eLearning/ILIAS/tree/trunk/setup#readme

    Kind regards, Matthias
  • jordyro
    jordyro | jordyro | 16. Jul 2022, 22:50
    File "storage/fsv2/eae/387/a7e/22146e1a3770bf80537be4b/0/data" not found.
    hello
    i've done migration, but, after migration i have 0 Bytes files.
    before migation i've checked and all files were in \ilFile folder.
    after migration the files dissapeared form \ilFile but they aren't ???moved(i guess) ??? to  "storage/fsv2/ folder
    so right now when i try to download file  i have
    File "storage/fsv2/0b5/f55/a6b/d8041e38b02338abaaf7563/0/data" not found error
  • utesche
    utesche | utesche | 18. Jul 2022, 06:34
    Edited on: 18. Jul 2022, 06:35 - by utesche | utesche
    Re: File "storage/fsv2/eae/387/a7e/22146e1a3770bf80537be4b/0/data" not found.
    Hello jordyro,

    the migration process writes a log file during migration:
    [DATA_DIR]/ilFile/migration_log.csv
    Each entry in it consists of: 
    [obj_id] ; [former_path_to_file_in_ilFile] ; [ressource_id] ; [assigned_file_version] ; [result_of_operation]

    Take a look for your file - search for:   0b5f55a6-bd80-41e3-8b02-338abaaf7563

    One known reason for missing files are filenames with some special chars in it, see: https://mantis.ilias.de/view.php?id=30930.
    If YOUR file is one of theses cases, you can try to copy the file manually to the required location and common name:

    >  cp [former_path_to_file_in_ilFile]  [DATA_DIR]/storage/fsv2/0b5/f55/a6b/d8041e38b02338abaaf7563/0/data
    (the new name of a file in 'storage' is always "data" !)

    Good luck,
    Uwe

    P.S.:
    finally I noticed that your error messages complains about a file having version 0 !?
    File "storage/fsv2/0b5/f55/a6b/d8041e38b02338abaaf7563/0/data" not found error

    This is not ok.  Perhaps the file was copied to storage, but as version 1 !  Very strange, I didn't notice such a behaviour before.
    If so, you could try to fix the version by SQL... possible, but requires good knowledges about the concerned data stuctures in the database.

    Last not least: you should use latest available ILIAS 7.x version for migrations, did you?
  • jordyro
    jordyro | jordyro | 18. Jul 2022, 14:10
    Re(2): File "storage/fsv2/eae/387/a7e/22146e1a3770bf80537be4b/0/data" not found.
    Thanks Uwe for reply. 
    I thought a was added a reply but it was very late (in the morning) and perharps i forgot to send-it. 
    i replicated the incident so this was happened:
    1. new clean debian : SMP Debian 5.10.106-1 (2022-03-17) x86_64

    2. installed dependencies, cloned ilias 7, restored from backup. 
    3. changed owner do www-data
    folowing scripts were run as root
    3. updated database.
    4. migrated database. here (I think) the script is creating in iliasdatadirectory storage/fsv2 folder (but with root owner)
    5. run php setup/setup.php migrate --run ilFileObjectMigrationAgent.ilFileObjectToStorageMigration --steps="-1"
    ------
    the script runs without errors but no file or folder was written in /storage/fsv2 folder. 
    on site files appeared but with 0 bytes.

    workarround:
    changed owner again to www-data on /storage folder
    (recopied files from backup of course)
    run the script again and everything was as should be!

    P.S. 
    if helps i could easy replicate again the problem. 

  • utesche
    utesche | utesche | 18. Jul 2022, 15:19
    Edited on: 18. Jul 2022, 15:22 - by utesche | utesche
    Re(3): File "storage/fsv2/eae/387/a7e/22146e1a3770bf80537be4b/0/data" not found.
    Quote (jordyro)
    P.S. 
    if helps i could easy replicate again the problem. 

     
    Hello jordyro,

    no need for a replication of the problem.  NOT executing the migration as the appropriate user (==> as 'www-data') explains your effects!
    You should always execute the setup script on CLI as the user which is running the PHP interpreter too  (=> the PHP worker, or the webserver, if PHP is embedded in the webserver):

    $ sudo -u www-data php setup/cli.php migrate      - or 'update' or 'install' or whatever...

    bye.