cPanel-to-DirectAdmin conversion tool

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
EDIT: July 6, 2019: Please use the newer convertor created by Martynas, as it's updated to use newer features and can be integrated to be called right within DA itself:
https://forum.directadmin.com/showthread.php?t=58069


==============================================================
This tool works by converting cPanel user backups to DirectAdmin user backups. This tool is designed to read all data directly from the cPanel user backup files; therefore, this tool can be executed on either the cPanel or DirectAdmin server.

This tool will covert cPanel backups created by both
- the /scripts/pkgacct script, and
- cPanel's 'Full Backup' GUI tool.


Latest available version (as of 03 March 2013):

http://www.pusathosting.com/file/da.cpanel.import.9.4.tar.gz

See posts #6 and #7 of this thread.

INSTRUCTIONS

1/ Download and extract the version URL (from above) that you wish to use. (wget and tar xzf)

2/ Create import and export directories for the tool to use. (mkdir import export)

3/ Copy your cPanel user backups into the import directory.

4/ Edit defaults.conf to match the DA server you will be restoring to. The only fields you must change are the IP and name server fields. The tool will not work if you fail to do this!

5/ Execute perl da.cpanel.import.pl and follow the on-screen instructions (which will duplicate the steps here to a degree).

6/ After the tool is finished converting (or as it completes each individual user), move your new DA user backups from the export directory to any DA /home/RESELLER/user_backups directory*

7/ Restore the DA user backups in DA's reseller-level Manage User Backups tool.

That's it!

*If the tool is being executed on a cPanel server, you can optionally have the tool automatically transfer your new DA user backups (after all conversion is complete) to a remote server.


ITEMS ACTUALLY CONVERTED

As of the current beta version, the following should convert:
  • basic account allocations
  • sub-domains
  • FTP accounts
  • POP3 and IMAP accounts
  • All mail data (Maildir and/or mbox format**)
  • Squirrelmail settings
  • addon domains
  • user home files
  • mysql databases
  • domain pointers
  • crontab entries
**If cPanel is using Maildir format and you wish to restore mail data, you must upgrade DirectAdmin (via Dovecot) to use Maildir before restoring the converted accounts. See link 1, link 2, and link 3.


OTHER NOTES & SUPPORT

This tool is provided at no cost and without warranty.

If you have questions, concerns, or run into problems, please reply to this thread.

If you wish to pay someone to convert for you, there are individuals that can help on this forum (myself included ;)).

Good luck & Happy converting! :)

Phi1
 
Last edited by a moderator:

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,005
Hello,

Just put the crypted pass in the .shadow file... (make sure there is no newline at the end of the file). DA will use that for the new accounts.

Nice work :D

John
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
If that's the case, account passwords should be working right now! :)

Also, as of today, I've lost my testing abilities on a cP server, so someone will have to confirm that it in fact does work.
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
If you like, sure. In my spare time I could also get a few more things converting over to DA..

I'll PM you :)
 

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
PS Anyone know how to create a cPanel backup instantaneously rather than waiting for it to run according to schedule?

Thanks,
Matt :)
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
thoroughfare said:
PS Anyone know how to create a cPanel backup instantaneously rather than waiting for it to run according to schedule?

Thanks,
Matt :)
Hmm.. no :)

Could you trick it into thinking it's time to build them?
 

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
Just a quick question... in default.conf, is 'owner=' the reseller that owns the accounts I'm moving?

Also, are the tars in /export labelled by username?

Thanks,
Matt :)
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
In default.conf, owner= should be set to the DirectAdmin reseller you'd like to own the converted accounts.

And yes, tarballs are labled by username.
 

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
Found it!

For future reference... use:

PHP:
/scripts/cpbackup
Make sure that you've configured the backups in your root WHM first though :)

More updates soon.

Thanks,
Matt
 

thoroughfare

Verified User
Joined
Aug 11, 2003
Messages
575
Oh, one more question Phi1... if I need to change the owner, can I just edit default.conf and run the perl script again?

Thanks,
Matt :)
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
thoroughfare said:
Oh, one more question Phi1... if I need to change the owner, can I just edit default.conf and run the perl script again?

Thanks,
Matt :)
Sure, I think :)
 
Top