Need some work done? Post a Project Today
We're moving from Plesk 9.5 to ISPConfig3 in a cluster environment.
I need a migration script that will move an account in plesk to ISPConfig3. Items moved need to include:
- MySQL databases
- website files, retaining ownership and permissions (and changing connection strings to databases as they will have new names as per the ISPConfig naming conventions).
- mail accounts and mail in IMAP
- mail settings
I need this script to be:
- written in PHP to be run by root
- use remote MySQL connection to get all Plesk data
- use ISPConfig API to create databases, mail accounts, SSH users, etc.
- fully interactive
- be able to run it multiple times for the same account
- only change what needs to change on subsequent runs, so the last run would be super fast.
The script flow should be as follows:
- ask for plesk server address, and mysql password
- ask for domain name to be copied
- ask for web server for ISPConfig to use
- ask for mail server for ISPConfig to use
- ask for DB server for ISPConfig to use
- ask for ISPConfig client user to import domain to
- check if databases exist, if not create
- re-sync database content
- re-sync web files, ensuring permissions stay the same, files previously owned by apache remain owned by apache, and files previously owned by the plesk domain will be owned by the ISPConfig user.
- check if mail accounts exist, and create if not
- re-sync mail settings
- re-sync IMAP mail content
Please read the project first and write the word "Understood". Also write your steps and suggestions to complete the project with a short description of what you understood.