Detect installed scripts after migration (mak virtualmin aware of installed scripts)

Hi…

as I am migrating manually web content from the old server to the new one that has virtualmin pro, I have discovered the “install scripts” :slight_smile:

Actually I saw them before, but just had a chance to play with them. It is a nice feature on the PRO to be able to update from the panel the scripts we have installed…

However, my question is… how can I make that virtualmin detect that I already have the scripts installed?

For example, I have the wordpress installed into the root of the domain. I have manually copied through FTP all files and created the database accordingly in the new format of the server (in the domain name database in mysql).

The only way I figured that I can do manually is to do the following:

  1. create virtualserver domain
  2. install script (example: wordpress in the root folder)
  3. copy from the old server the files through FTP
  4. move old database to the new database created & update database & other settings in the config files (in my case of the wp-config.php file).

So in this case, I have a virtualserver that is AWARE that there is a script installed and be able to update the scripts from the virtualmin directly.

Is there any other way to make virtualmin aware of the installed scripts in a virtualserver?

I am seeing the option: Install Un-supported Version
From what I see I can install manually the script and tell it where it is… however, seems to be the same thing as installing supported scripts.
If there is already a script installed, but virtualmin is not aware of it and installing it, will it break my database?

Thanks.

I am also interested in this, I am considering getting the “PRO” version - and would appreciate any insight into how this is supposed to work (or not).

Basically, having some way to detect and existing installation and “parse/validate” it against the fields commonly expected/required by the install script.

In theory, those should be identical to what’s required to make migrations work for installed scripts, assuming that the installed scripts may use “hard coded” configuration values that may change when migrating a website to another server.

I’m aware that this may be kinda fragile and may not detect customizations - so probably tricky to get right for all but the most basic cases.

Conceptually, it could work along these lines:

  • try to detect existing installation
  • parse htdocs and look for typical files
  • come up with the corresponding install script
  • check if the installed version is supported by the install script
  • check the checksum of each file in the tarball against the locally installed version
  • (ignore cached/temp files)
  • determine if the local version has been modified or not based on CRCs/md5sum
  • if any files were modified in the previously installed version, show a big red warning, along with a list of files
  • provide an option to still proceed

so these heuristics could help detect existing installations and validate them against the versions supported by the install script, and it would be up to the user to decide if they want to “import” the installed version or not.

Migration-wise this could obviously help, because virtualmin could reach over to the scripts feature to handle script-specific migration necessities.

Yeah it will be great if you implement this :smiley: