Feature Wiki

Information about planned and released features

Tabs

Setup: Add Import/Export for Installation

1 Initial Problem

ILIAS currently has no mechanism to export and import data of a complete installation. This functionality is missing for two reasons:

  • We need a database export to ship a functioning installation of ILIAS in the first place. The initial database template of ILIAS is, in fact, a dump of an existing installation somewhere on infrastructure of the ILIAS society. The script to create that initial dump is an artifact passed along in some way, but it is neither open source nor maintained by the community via standard procedures. Also, the script only creates a dump of the database, which makes it impossible to deliver files with the standard installation.
  • Packing, moving and redeploying data of some installation is helpful in various other scenarios: To archive installations, e.g. to document online exams. To create standardized testing and development environments. Currently people need to fall back to more high level mechanisms to achieve the same, like VM images, or implement according scripts themselves.

2 Conceptual Summary

The setup gets two additional facilities:

  • To export the data of an installation, the setup will get a new named objective called buildExportZip that can be used to bundle data of the installation into a *.zip-file. It can be used via the achieve command of the setup to create that data bundle at call-side: php $PATH_TO_ILIAS/setup/setup.php achieve setup.buildExportZip. The bundle will contain most of the data of the installation, i.e. a dump of the database, the files from the filesystem and directory, and a metadata file that gives information about the content of the bundle itself.
  • To import the data from a bundle, the install command will get an option --import-file that can be pointed to a previously created data bundle. The installation will then use that database and files to create the initial content of the installation (instead of the default one located in the repository).

The exported database data can be further processed via an export-hook that can be configured in the configuration of the setup. This can be used to e.g., anonymize the data to ship it with the official installation of the ILIAS society.

3 User Interface Modifications

3.1 List of Affected Views

  • None.

3.2 User Interface Details

None.

3.3 New User Interface Concepts

None.

3.4 Accessibility Implications

None

4 Technical Information

The implementation of the feature uses ifsnop/mysqldump-php to create database-dumps.

The general export of mysql-data is implemented using a fairly generic interface that can be implemented in various ways, e.g. by exec'uting mysqldump on the command line. The import of the data works as is, i.e. standard sql is used as a storage format for the database dump. Only the export-hook relies on the specifics of ifsnop/mysqldump-php. The effort to replace the library hence would mostly be on side of the users of the export-hooks, requried effort in the core would be minimal.

The libray itself has a long history (> 10 years) and various contributors. It has an extensive documentation that can be used to build export-hooks. The size of the actual code is manageable and automated test exists. The license is GPLv3, hence compatible with ILIAS.

If the tool is not maintained or trustworthy anymore, we could either fall back to a simpler implementation, e.g. using mysqldump, look for another option or maintain the code ourselves.

5 Privacy

The feature will be available via the CLI on the server backend only. The possibility to create database dumps already exists there. Hence there are no special privacy implications included in this feature.

6 Security

The feature will be available via the CLI on the server backend only. If an adversary has access there, she will already be able to do all the things that this tool could possibly do.

This tool can help to improve the security wrt to reproducability of the installation we are distributing.

7 Contact

8 Funding

If you are interest in funding this feature, please add your name and institution to this list.

9 Discussion

30 Oct 2023 Klees, Richard [rklees]: A question some might ask: Why this so late? This feature request hasn't been there until feature freeze. At CaT we came across the problem described here, decided to solve it and donate the code. Our internal development cycles do not align with ILIAS's, so we decided to propose the code anyway. The situation regarding creation of ILIAS installables via the unmaintained code is odd atm, and we simply hoped to improve the situation there.

10 Implementation

{ The maintainer has to give a description of the final implementation and add screenshots if possible. }

Test Cases

Test cases completed at {date} by {user}

  • {Test case number linked to Testrail} : {test case title}

Privacy

Information in privacy.md of component: updated on {date} by {user} | no change required

Approval

Approved at {date} by {user}.

Last edited: 30. Oct 2023, 10:38, Klees, Richard [rklees]