ensim 4.0.x to direactadmin migration script

stffabi

Verified User
Joined
Oct 14, 2004
Messages
50
[BETA RELEASE] ensim 4.0.x to directadmin migration script

I'm currently developing a migration script from ensim pro 4.0.x to directadmin. A lot is working but there are still some things I have to implement.

Should also work with 4.1.x as long as ensim hasn't changed the file system and export.xml structure.

I've made the third beta avalaible for download.

Current Version: v. beta 1.3

Ensim To DirectAdmin Script Beta 1.3

Important for freebsd da users, with da version prior to 1.24
Due to a problem with the restore sytem in da, you have to unoutcomment the line in the script.

# $passwd =~ s/\$/\\\$/g;

This will be fixed in the next release of da.

If you don't do that the root password of your freebsd box will be overwritten when you restore a converted tarball on da.

The script is based on da.cpanel.import.pl authored by Phil 'l0rdphi1' Stier, I would realy like to thank him, for his work.

This new beta version completely works on the backup tarballs of the ensim server. So you don't need to run the script on the ensim server. Also this version imports all password hashess, so the passwords will be the same on directadmin as on the ensim server.

The ensim backup tarballs has to be in the import directory and it creates directadmin backup tarballs for the sites in the export directory.

Use this script at your own risk, I'm not responsable if anything goes wrong or something blows up.

Here's the current feature list of the migration script
- all passwords will be imported
- The ensim siteadmin user will be imported as a normal pop account and a normal ftp user. The ftp user will have access to the complete domain. This way customers don't have to change the login in their ftp or mail program. The migration script will then choose a new username for the directadmin main user.
- new directadmin main user will bei choosen the following way. I append "da" to the ensim siteadminusername then special chars ("-",".","_") in this username will be removed and the username will be cutoff at 10 characters, this is limited by da. The password for this user will be set to the password of the ensim siteadmin user.
- subdomains import
- webalizer stats import
- public_html files import
- ftp accounts import, also for subdomain owners
- pop3 accounts will be imported
- email aliases import
- email forwarders import
- email vacation messagesimport
- majordomo mailng list import
- catch all settings
- email accounts import including their pop3 messages, and imap folders
- domain aliases import
- mysql databases import
- mysql db will be renamed from domain_tld_-_dbname to dauser_dbname, and the da mysql db name will be cutoff at 16 characters, as of the limitation of mysql.
- renaming the dbnames in the script files
- mysql main user import
- fix .htaccess file of powertools
- fix all absoulte and relative paths in script files

What's on my ToDo list
- htpasswd files

Requirements
The migration script needs the XSLT. pm Perl Module to migrate the tarballs.

Before running the tool, you have to customize the defaults.conf file. You have to create the directory import and export, where you've extracted the script.

Please send bug reports or comments fabi[at]vweb.ch

Thanks you

Kind Regards
Fabrizio
 
Last edited:
How about:
- Frontpage Extensions
- User SSH Access
- User FTP Access

Thank's for your great job.
I'll wait for that ;)
 
Hi Alex2k

Thanks for your reply

- User FTP Access works like this at the moment.
If the user was a subdomain user, I add the subdomain to da, and I create a ftp user with the homedirectory in this subdomain directory. The adminuser of ensim has access to the complete domain. Other users that have ftp access I currently create a user directory under /domain/private_ftp with all their data.

I have the proftpd on our DA server setup that users will be bounded into their homedirectory.

Is that what you thought about it?

- User SSH Access
As far as I know DA only supports the main user (client) of the domain to have ssh access. So for I have a defaults.conf where you could set if you want to exported domains to have ssh access or not.

- FrontPage Extensions
This could be tricky, I'll have a look into it. We only have 4-8 domains with FPE so I didn't care much about it. I will look into it.

Kind Regards
Fabrizio
 
Yes, that's what I mean.
I'll wait for your release then :)

Btw, it will work with Ensim 3.5 and 3.7 also?
Thank's again...
 
I think It should work with 3.7 because thay haven't changed so much since 3.7, but for 3.5 I can't tell you if it would. I don't have any 3.5 server anymore, to test it.

Regards
Fabrizio
 
;)

I hope I'll finish with the script until this weekend. Then we have to do some tests on it, but I will also post that version, so If you would like you could also do some tests with sites.

Another question what would you prefer that the script works directly on the site's filesystem or on backup tarballs?

Fabrizio
 
Ok, as soon as I am finished with the script I'll change it to use tarballs.
 
I'll release a first beta of my script today. It's now based on the backup files of ensim.
 
Ok, that would be great.

I've found a little problem caused by the change that the script works on the tarballs.

I'll have to fix this before posting the script. So it will be delayed perhabs to wednesday.

Thanks for your understanding.
 
BETA 1 RELEASED

I've released a first beta of the migration script. The link could be found in the first post of this thread.

This version currently doesn't completely work on the backup tarballs. It takes the password hashes and the usernames out of /home/virutal/domain/etc/shadow but all other things are taken from the backup tarballs. So the script has at the moment to be run on the ensim server where the domain is located. I'll change this in a second beta.

Kind Regards Fabrizio
 
Re: [BETA RELEASE] ensim 4.0.x to directadmin migration script

stffabi said:
I'm currently developing a migration script from ensim pro 4.0.x to directadmin. A lot is working but there are still some things I have to implement.

I've made the first beta avalaible for download.

Current Version: v. beta 1.1

Ensim To DirectAdmin Script Beta 1.1

Important for freebsd da users, with da version prior to 1.24
Due to a problem with the restore sytem in da, you have to uncomment the line in the script.

This will be fixed in the next release of da.

Fabrizio

Hello All,

I have created the backup tar balls in /import directory on the Ensim server and have run the script to copy the files into the /export directory. Now I have copied them over to the DA machine but can't figure out how to do the import/restore in DA. Does anyone have any further instructions for importing/restoring the date in DA?

TIA


Errol
 
You have to place the converted tar files to the /home/admin/user_backups directory on the directadmin server. then you can login to the da panel with your admin login. there you go to the reseller level and select "Manage user Backups". There you will find the list of all tar files that are stored in the /home/admin/user_backups directory

If you have any problem please let me know it.

If you are doing the production migration, I would suggest you not to use the current beta migration script. there's a bug when with the email aliases. another thing I have changed in the newest version is, the ensim mainuser will bei imported as a normal ftp user with the permission the the entire domain, it creates also a email account for the ensim main user. So all your clients don't have to change anything in their ftp or email program. For the directadmin main user, there will be a new username selected, it begins with "da" + ensimusername cutted to 10 characters

If you would like to have this version, I can release a new beta in 2-4 hours.

Kind Regards
Fabrizio
 
stffabi said:

If you would like to have this version, I can release a new beta in 2-4 hours.

Kind Regards
Fabrizio

Hello Fabrizio,

Thanks for your reply.

Can I have the new version? Also, I noticed that Ensim does not backup the user's password information so how can I get that information without contacting the users for their password details?

regards,

Errol
 
Yes, you could have the new version. Ensim saves the password hashes for each user into the export.xml file contained in the backup tarball. I'm currently changing my script to use these password hashes instead of directly accessing the domain's shadow file on the ensim server.
So you will be able to import the users with their passwords.

Regards
Fabrizio
 
stffabi said:
Yes, you could have the new version. Ensim saves the password hashes for each user into the export.xml file contained in the backup tarball. I'm currently changing my script to use these password hashes instead of directly accessing the domain's shadow file on the ensim server.
So you will be able to import the users with their passwords.

Regards
Fabrizio

Nice one! I'll awaiting the new script.

TIA

Errol
 
A little question. Did you run the migration script under your reseller account on your reseller? If yes, would it be possible for you to install XSLT.pm for perl? This would make the things a little bit easier to get the password hashes.

Fabrizio

elkabong said:
Nice one! I'll awaiting the new script.

TIA

Errol
 
Yes I did run the migration script under my reseller account.

Forgive my ignorance but how do U install XSLT.pm for perl?

regards,

Errol
 
Back
Top