•  
      request #31156 Usage of `importDump.php` & `importImages.php`
    Infos
    #31156
    Manuel Vacelet (vaceletm)
    2023-03-21 13:25
    2023-03-15 11:45
    32784
    Details
    Usage of `importDump.php` & `importImages.php`

    Those 2 scripts are available for importing content in a MW instance. Can we use them with the wiki farm and if yes, how ?

    Mediawiki Standalone
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Robert Vogel (rvogel), Dejan Savuljesku (dsavuljesku)
    Stage
    Robert Vogel (rvogel)
    Closed
    2023-03-21
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar

    It works perfectly fine. Thank you !


    • Status changed from New to Closed
    • Assigned to changed from None to Robert Vogel (rvogel)
    • Close date set to 2023-03-21
    User avatar
    Robert Vogel (rvogel)2023-03-21 11:59
    last edited by: Robert Vogel (rvogel) 2023-03-21 11:59

    Yes, on can use basically any MaintenanceScript and specify the targeted wiki instance by the --sfr option. It must be provided with a valid (registered) "group id" or "project name". The config-dispatcher in extensions/TuleapWikiFarm will then load the proper wiki instance and have the MaintenanceScript operate on it.

    Regarding the concrete two scripts: Please run importImages.php before importDump.php. Nothing really breaks if you don't do it, but you may end up with wikipages that show "red links" instead of images, until one manually clears the parser cache (?action=purge). This can easily be avoided by first importing the files/images and then the pages that use them.

    Here is an example of how those scripts could be called, given the Project is called testabc and has the ID 103:

    php maintenance/importImages.php --sfr=testabc /path/to/data/images/
    php maintenance/importDump.php --sfr=103 /path/to/data/output.xml