View Full Version : cPanel-to-DirectAdmin conversion tool
l0rdphi1
02-25-2004, 04:46 PM
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.
VERSIONS
Current Version: v.9.4
Last updated 2009-01-13
http://kade.nu/da/da.cpanel.import.9.4.tar.gz
Old Version: v.8.3
Last updated 2004-11-04 at 5:47 PM EST
http://data1.liquenox.com/installatron/da_cpanel_import.tar.gz
(without Maildir support)
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 (http://www.directadmin.com/features.php?id=590), link 2 (http://help.directadmin.com/item.php?id=109), and link 3 (http://www.directadmin.com/forum/showthread.php?s=&threadid=11110&highlight=mb2md).
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
DirectAdmin Support
02-26-2004, 09:50 AM
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
02-26-2004, 01:38 PM
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.
teedee
02-27-2004, 02:24 AM
I have a few CPanel boxes if you need to test some more
l0rdphi1
02-27-2004, 05:31 AM
If you like, sure. In my spare time I could also get a few more things converting over to DA..
I'll PM you :)
FeBox
03-01-2004, 02:51 PM
l0rdphi1,
Will your site be coming back up? :D
l0rdphi1
03-01-2004, 06:06 PM
Bloody Nocster. Should be up now.
FeBox
03-01-2004, 06:16 PM
Yea, boo @ nocster. :P
Thanks!
thoroughfare
03-18-2004, 04:14 PM
Here goes... I'm gonna try this... arrrggghhh!!!
Fingers crossed ;)
Matt
thoroughfare
03-18-2004, 04:30 PM
PS Anyone know how to create a cPanel backup instantaneously rather than waiting for it to run according to schedule?
Thanks,
Matt :)
l0rdphi1
03-18-2004, 04:30 PM
Godspeed. Hopefully all will go smooth :)
l0rdphi1
03-18-2004, 04:31 PM
Originally posted by thoroughfare
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
03-18-2004, 04:34 PM
That what I was thinking... I'm looking through cron now ;)
Matt
thoroughfare
03-18-2004, 04:36 PM
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
03-18-2004, 04:50 PM
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
03-18-2004, 04:53 PM
Great :) You've got another vote for DA forumer of the year :)
Thanks,
Matt
thoroughfare
03-18-2004, 05:08 PM
Found it!
For future reference... use:
/scripts/cpbackup
Make sure that you've configured the backups in your root WHM first though :)
More updates soon.
Thanks,
Matt
thoroughfare
03-18-2004, 05:09 PM
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
03-18-2004, 05:16 PM
Originally posted by thoroughfare
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 :)
thoroughfare
03-18-2004, 05:35 PM
Iiiiiiiiiiiiiittttttttttt's running!
Matt
l0rdphi1
03-18-2004, 05:41 PM
:D
thoroughfare
03-18-2004, 05:44 PM
Hi,
Working well so far, just make sure everyone that you create the 'user_backups' directory first if you use the script to transfer the tarballs... otherwise the script creates a file called 'user_backups' which is kinda odd :)
HTH,
Matt
thoroughfare
03-18-2004, 05:46 PM
Restores added to the system queue...
:D
Matt
thoroughfare
03-18-2004, 05:49 PM
Nooo... an error :(
Unable to exact backup/user.conf from /home/admin/user_backups/xxxxx.tar.gz : Error while extracting backup/user.conf to /home/admin/user_backups/xxxxx as admin :
HTH,
Matt
PS xxxx = the username
l0rdphi1
03-18-2004, 05:56 PM
This isn't a owner/permissions problem, is it? Try duplicating the settings of normal DA backups.
Besides that, extract the tarball manually and see if there's a backup/user.conf file.
thoroughfare
03-18-2004, 05:57 PM
Checking now :)
Matt
thoroughfare
03-18-2004, 06:06 PM
Hi,
The user.conf file exists and is valid. The file is for a reseller's user panel if you know what I mean, not for a user that they've created themselves.
I'm trying now to move the tarball in to the backups directory of the reseller's account now, and restore if from their control panel.
Thanks,
Matt
thoroughfare
03-18-2004, 06:08 PM
Ok that worked very well, only the MySQL databases didn't copy over.
Not bad going so far!
More updates soon...
Matt :)
l0rdphi1
03-18-2004, 06:12 PM
I had a hell of a time getting mysql to copy over. Might be better doing that manually, although they were copying for me when I released this script. Don't know what to suggest.. :)
thoroughfare
03-18-2004, 06:14 PM
No problem. The FTP accounts didn't copy over either.
The user had FrontPage extensions enabled, so I had to enable it in DA too... I got an error, but you can work around it by deleting the old password file 'service.pwd'.
:D
Matt
thoroughfare
03-18-2004, 06:42 PM
Actually we may be in luck... I don't think the user actually had any databases :)
HTH,
Matt :)
l0rdphi1
03-18-2004, 06:47 PM
That's a plus :)
thoroughfare
03-18-2004, 07:03 PM
Hi,
I tried restoring the users under the reseller, got the following error:
Cannot create user: Unable to allocate unlimited Bandwidth. This account is not allowed to create that amount
Domain xxxxxxxx.com Created
Domain Created Successfuly
Unable to restore database xxxx_xxxx.sql to xxxxx_xxxxxxx : ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
sh: line 2: --user=xxxx: command not found
HTH,
Matt :)
l0rdphi1
03-18-2004, 07:38 PM
Don't know what to say with the unlimited error.. is unlimited working with DA-to-DA tarballs?
As for the sql error, I'm no use either :) Doesn't make sense, really. I guess the convertor isn't putting them in the tarball right.
Hmm...
thoroughfare
03-18-2004, 07:45 PM
I'm not sure either :confused:
Matt
DirectAdmin Support
03-18-2004, 08:02 PM
Hello,
1) cannot extract backups/user.conf : I'm try to track down that error, but can't duplicate it on any of the build systems.
2) Unable to allocate unlimited Bandwidth. This account is not allowed to create that amount : that just means that the Reseller is restoring a user who has unlimited bandwidth, but the Reseller account isn't allowed to create a user with unlimited bandwidth. Either decrease the limit in the user.conf file (inside the tar.gz) or else crank up the bandwidth limit on the Reseller to unlimited.
3) The mysql error is very odd. for a few reasons, 1) it's doing it as root.. which isn't anywhere in the code, 2) there is no password passed, which aslo isn't in the code. That one will need to be looked into.
Starting tomorrow at about noon (March 19th), our build systems will be down for about a day while we move to a new location. Hopefully the internet connection will be setup without any problems and we can get up and running again smoothly. :)
John
thoroughfare
03-21-2004, 06:31 PM
lordphi1:
Altogether this script has been *very* useful. Thank you very much :)
John:
Remember that if you use mysql from the commandline, without passing a username, it assumes root; could that be the problem? I experienced the error with serveral other users too. In the end I just used MySQL dumps and SCPed them across.
HTH,
Matt :)
l0rdphi1
03-21-2004, 07:05 PM
Originally posted by thoroughfare
lordphi1:
Altogether this script has been *very* useful. Thank you very much :) Yes, thank you - it was fun throwing together. There are a few quarks that need worked out, especially with mysql. Hopefully I or someone will get to them soon. :)
thoroughfare
03-21-2004, 07:09 PM
PS Another tip... it didn't process site redirects properly, I had to recreate them. I can't remember why though :(
HTH,
Matt :)
greggcz
04-16-2004, 01:42 AM
I've been tracking development of this tool for a while and what can I say: GREAT JOB !
I noticed one thing though:
In the script you are assuming that mysq.sql in cP will contain 'REPLACE INTO' statements while it actually contains 'GRANT' statements, this breaks your script and this might be the cause for all mysql errors during restore.
l0rdphi1
04-28-2004, 01:46 PM
There are a few issues with this tool. I need a cP server and finish it off and fix any issues. I won't have any free time until after May 5th though.
FeBox
04-28-2004, 01:49 PM
I just tried using it now, and it seems its *gasp* broken? I understand the mysql stuff, but as far as email accounts, it doesnt import any of those, it also doesnt import the public_html at all.
I just read your post l0rdphi, I'll move them over manually, at least your script packages everything up correctly (except mysql) so it will be a little less painless. ;)
Thanks a bunch! :)
l0rdphi1
04-28-2004, 01:53 PM
Not even HTML files? That's certainly odd. Are you sure it used backups from where it asked?
FeBox
04-28-2004, 01:56 PM
Yep, it didnt move over the html files at all. I extracted the tar file and they were in fact in there too. And yea it used the correct tar file because I had it upload it right after the script finished.
l0rdphi1
04-28-2004, 02:03 PM
No idea then. I'll have to look at it some time after May 5th.
greggcz
04-28-2004, 02:04 PM
I noticed it doesn't restore html files correctly as well
FeBox
04-28-2004, 02:06 PM
No Problem. I'll try and troubleshoot it in the meantime.
l0rdphi1
04-28-2004, 02:11 PM
Since it definitely did work for me and others in the past, my guess is either (a), cP changed something to their backup format, or (b), there is some kind of end-user error going on here. I'd be inclined to the latter, since cP does have two backup formats I know of, and this script only supports the one right now. (which is the backups from /backup/cpbackup/daily, /backup/cpbackup/weekly, or similar directory.)
Oh well. If anyone wants to dig in and try to fix this, go right ahead.
FeBox
05-06-2004, 08:05 PM
*edit*
THIS NO LONGER HAS TO BE DONE
FeBox
05-19-2004, 09:29 PM
Heya,
Any update on this script for the mysql part?
Also, it leaves out the crontab... ;)
Thanks!
SlashChick
05-31-2004, 02:14 PM
Any idea why mailboxes don't convert? The usernames show up, but the actual mail spool for each user isn't there. This is a pain to move manually.
Also, account passwords don't work; we've been manually resetting them.
Thanks for the tool, though. It has saved us some work in coverting nearly 50 domains off of a cPanel server. ;)
l0rdphi1
05-31-2004, 02:21 PM
FeBox and I finally debugged mysql databases, so they now should work.. yay!
As for mailbox data, I never got around to implementing that. And passwords I could look into sometime, but I'm not sure they will ever work
Have fun all.
FeBox
06-03-2004, 04:42 AM
SlashChick, I found a fix for the password problem.
The /home/USERNAME/.shadow file doesnt match the line in the /etc/shadow file. The password in the /home/USERNAME/.shadow file is CORRECT; its the line in the /etc/shadow file that is incorrect. Just copy the password line from the /home/USERNAME/.shadow file to the /etc/shadow file.
The script for some reason deletes the first maybe 5 or 10 characters. I haven't been able to figure out what character is making it do that because the characters are different each time. I looked at the code, and since I'm clueless in Perl, I wasn't able to figure it out.
Let's say I only have a reseller account on a CPanel server, is it possible to use this tool to convert accounts under mine to a DA server?
Assume that I have root on the DA server, and only reseller account on a Cpanel with SSH.
thoroughfare
06-20-2004, 04:10 PM
I think possibly DirectAdmin should pay L0rdPhi1 to finish the script properly, and they could provide in on the DA site.
It'd really increase sales of DA IMHO.
Matt :)
l0rdphi1
06-20-2004, 08:16 PM
Originally posted by Jing
Let's say I only have a reseller account on a CPanel server, is it possible to use this tool to convert accounts under mine to a DA server?
Assume that I have root on the DA server, and only reseller account on a Cpanel with SSH. Hello,
Do you have SSH access? Can you use /scripts/pkgacct? If either is no, can you export (i.e., download, or copy to a remote server) cPanel backups for your cPanel users?
This tool can be run on the DA server now, so you could simply copy the backup tarballs over to your DirectAdmin server and run this tool there (however this method is untested).
Also, mail box data now converts.. that's something else I added back a week or so.
Phi1.
l0rdphi1
06-20-2004, 08:26 PM
Originally posted by thoroughfare
I think possibly DirectAdmin should pay L0rdPhi1 to finish the script properly, and they could provide in on the DA site.
It'd really increase sales of DA IMHO.
Matt :) Allotted time and a server for testing, I can perfect this tool. However, pretty much everything possible is already being converted. Account passwords are a deal I haven't looked at real closely, but they're the only big thing I see yet to be attended.
I would also like to get this working 100% for reseller users. If what I posted above does not work, I will need a cP reseller account to implement a workaround.
Phi1.
neorder
06-20-2004, 10:02 PM
I would also like to get this working 100% for reseller users. If what I posted above does not work, I will need a cP reseller account to implement a workaround.
does your software work for resellers at this moment? i'm in need to transfer some of my sites to DirectAdmin.
if you need my reseller account to test, let me know. :D
l0rdphi1
06-21-2004, 06:40 PM
I know of no tests on cPanel reseller accounts. You're free to give it a shot though :D
Phi1.
thoroughfare
06-21-2004, 07:16 PM
I think I tried that once :p
Erm, it almost worked, but didn't :)
Matt
l0rdphi1
06-21-2004, 07:23 PM
Actually, what are we try to do here? :)
1/ Are we backing up a WHM "reseller" account?
2/ Are we -as a reseller- trying to backup a normal user?
Phi1.
neorder
06-21-2004, 08:17 PM
since we have no root access, i suppose it's option 2?
thoroughfare, you've tried b4? i'm going to give it a try as well!
edit:
okay, i can't modify the file defaults.conf due to permission limit. looks like i've to move the websites 1 by 1.
btw, is the contend in defaults.conf referring cpanel or DA server?
ip=000.000.000.000
ns1=ns1.yourhost.com
ns2=ns2.yourhost.com
creator=admin
docsroot=./data/skins/default
account=ON
aftp=OFF
cgi=ON
dnscontrol=OFF
nemailr=unlimited
nemails=unlimited
package=custom
php=ON
skin=default
ssh=OFF
ssl=ON
suspend_at_limit=ON
suspended=no
zoom=100
there are a few options i don't understand:
1. docsroot=./data/skins/default
is this default skin setting? or this is the skin called "default"?
2. aftp=OFF
is this ftp? shouldn't i set it to on?
3. package=custom
different user use different packages, what is this "custom" package referring?
4. zoom=100
what is this option for?
thanks.
l0rdphi1
07-01-2004, 05:40 AM
Hello,
Originally posted by neorder
okay, i can't modify the file defaults.conf due to permission limit. looks like i've to move the websites 1 by 1.This tool should run on the DirectAdmin server now. So just transfer the tarballs over and you should be okay.
Originally posted by neorder
btw, is the contend in defaults.conf referring cpanel or DA server?For DA.
Originally posted by neorder
there are a few options i don't understand:
1. docsroot=./data/skins/default
is this default skin setting? or this is the skin called "default"?That's the skin root. For instance, ./data/skins/default will give incoming users the default skin. ./data/skins/enhanced is the new DA skin.
Originally posted by neorder
2. aftp=OFF
is this ftp? shouldn't i set it to on?That's anonymous FTP.
Originally posted by neorder
3. package=custom
different user use different packages, what is this "custom" package referring?Any user that has a custom bandwidth or storage configuration gets his or her package set to custom.
Originally posted by neorder
4. zoom=100
what is this option for?Nothing. You probably no longer need it :)
Phi1.
Stormbox
07-01-2004, 05:52 AM
Hi,
I have installed everything.
but some how it did not convert .
any one can help
i have copy pkgacct into import folder
but when i try to perl.
it does not work
netmotiv8
07-13-2004, 10:23 AM
Is there a way of offering a single customer who currently runs on cpanel to give us their backup file, which we can then convert/import on our DA server using the script you have written.
We were thinking that we could start attracting customers away from hosting companies running cpanel by offering a simple a swift conversion from there cpanel backup file.
It seems that at present this discussion has been about conversion of mulitple accounts from cpanel to DA rather about what I would like above.
Neil :D
l0rdphi1
07-13-2004, 01:19 PM
That all depends on the structure of the cPanel user-level backup tarball. If anyone has one handy, I will be happy to look at it :)
Phi1.
1024solutions
07-19-2004, 08:42 AM
Hi all,
does this tool already works with reseller backup tar files?
in other words: can it be run on the DA server with root access and backup-17112003_username.tar.gz backup files?
Kinds regards,
Marcel
greggcz
07-19-2004, 10:14 AM
Originally posted by l0rdphi1
That all depends on the structure of the cPanel user-level backup tarball. If anyone has one handy, I will be happy to look at it :)
Phi1.
The only thing that differs is the directory name and the file name.
Simple way to use would be to untar the archive rename the root directory name to <username> and tar it back again.
Worked for me..
l0rdphi1
07-19-2004, 10:59 AM
Originally posted by greggcz
The only thing that differs is the directory name and the file name.
Simple way to use would be to untar the archive rename the root directory name to <username> and tar it back again.
Worked for me.. Well, that answers that then :D
I'll still need one to modify this script though (for testing).
Phi1.
l0rdphi1
07-19-2004, 11:01 AM
Originally posted by 1024solutions
Hi all,
does this tool already works with reseller backup tar files?
in other words: can it be run on the DA server with root access and backup-17112003_username.tar.gz backup files?
Kinds regards,
Marcel This tool works with tarballs created by cPanel's /scripts/pkgacct. Beyond that, it's murky water.
Phi1.
1024solutions
07-20-2004, 12:35 AM
Originally posted by l0rdphi1
This tool works with tarballs created by cPanel's /scripts/pkgacct. Beyond that, it's murky water.
Phi1.
The answer is indeed extracting the backup tar, renaming the root dir to the username and tarring it back again.
Only thing, i get the error on mysql, trying to restore databases as root@localhost without a password.
greggcz
07-20-2004, 04:40 PM
Originally posted by l0rdphi1
This tool works with tarballs created by cPanel's /scripts/pkgacct. Beyond that, it's murky water.
Phi1.
You could probably add a simple check to accept the directory and filename in the syntax of <username>-<date>(.tar.gz)
l0rdphi1
07-20-2004, 10:12 PM
I'll look into adding this tomorrow. :)
Phi1.
xcensus
07-25-2004, 06:06 PM
Your conversion tool rocks, I would like to thankyou for taking the time to help us all out in this matter, its very decent of you.
P.S. Any new version above .7 on the horizon ? Need to convert some domains off an old reseller account.
Cheers
l0rdphi1
07-26-2004, 07:31 PM
Hello,
Originally posted by xcensus
P.S. Any new version above .7 on the horizon ? Need to convert some domains off an old reseller account.
Reseller account? Do you mean a WHM account?
I plan to add <username>-<date>(.tar.gz) support really soon, I just need an extra hour or two to actually do it :)
Thanks, Phil.
xcensus
07-26-2004, 11:03 PM
Hi,
From the clients backups that they create with cpanel, like you said it has backup-domainname.com-date.tar.gz etc, but I also noticed that mysql databases are not included in these backups as they have to be downloaded seperate, am I right ?
Cheers
l0rdphi1
07-26-2004, 11:43 PM
xcensus,
That may be true. No one has passed me a backup to play with yet :D
Phi1.
Protollix
07-27-2004, 08:09 AM
Thanks for writing this man. I was able to use this to transfer most things from ~40 some cpanle clients over to DA.
Does DA not backup a user's home directory contents. A lot of people put downloads or config files in there so it is not in their web root. I had to manually transfer a lot of files over. Not complaining, but noticed in the DA backup files, it doesn't look like DA copies files from the home directory.
intelliot
07-29-2004, 04:02 PM
I'd like a simple utility to convert CPanel backups to DirectAdmin ones. Does this need to be done on the server?
greggcz
07-29-2004, 04:06 PM
Originally posted by intelliot
I'd like a simple utility to convert CPanel backups to DirectAdmin ones. Does this need to be done on the server?
No, you can this tool on DirectAdmin server now, it doesn't have to be done on cpanel.
1024solutions
07-30-2004, 04:54 AM
What is the latest version of this tool right now?
Is there a way to make this into a module in directadmin admin level so that it is nice and smooth ? Is there any update on this tool version ? What are the known bugs still ?
Sorry to be a pain, but I have loads of servers to convert from cpanel to directadmin ... but i need to test it on at least 1 machine first ... lol ..
Any info would be helpfull. Thanks,
-Nathan
l0rdphi1
07-30-2004, 09:33 PM
Originally posted by 1024solutions
What is the latest version of this tool right now?
Hello,
Version .7 is the current version as of today, 2004-07-30 :)
Phi1.
l0rdphi1
07-30-2004, 09:38 PM
Hello,
Originally posted by nate
Is there a way to make this into a module in directadmin admin level so that it is nice and smooth ?That's a feasible development path, but I'm not so sure this tool will benefit from residence as a DA plugin. Give this tool a run and let me know what you think. :)
Originally posted by nate
Is there any update on this tool version ? What are the known bugs still ?As far as I know, all listed is 100% working provided my instructions are followed :)
Originally posted by nate
Sorry to be a pain, but I have loads of servers to convert from cpanel to directadmin ... but i need to test it on at least 1 machine first ... lol ..
Any info would be helpfull. Thanks,
-Nathan Good luck :) I'm here to help if need arises.
Phi1.
Hello,
The only reason why i asked about the plugin is because some of us do not do much through the shell. I have used cpanel for years and i am trying my best to get away from it, so having an interface for things makes it easier to understand and get used to. At any rate, I will give it a try.
Thanks again !!
-Nathan
l0rdphi1
08-04-2004, 10:52 PM
I just uploaded version .8. This tool now works with backups made by both cPanel's /scripts/pkgacct & the GUI user backup page.
Phi1.
xcensus
08-04-2004, 11:02 PM
Does it convert mysql over aswell from the GUI backups ?
l0rdphi1
08-04-2004, 11:08 PM
Yes, mysql was transfered over for me :)
Phi1.
xcensus
08-05-2004, 10:44 AM
Seems the resulting backup-usrname-date.tar.gz from GUI backups needs to be renamed to the account username.tar.gz before DA will allow you to import it.
xcensus
08-05-2004, 10:45 AM
Renamed the file to the username, restored it and got this error :(
Subject: An error occurred during the restore. Today at 17:44
backup-1nosept.com-7-25-2004@ is an invalid email address. User zula will not be created
From: Message System
l0rdphi1
08-06-2004, 01:03 AM
Originally posted by xcensus
Seems the resulting backup-usrname-date.tar.gz from GUI backups needs to be renamed to the account username.tar.gz before DA will allow you to import it. Post the real filename you have. GUI backups made from /frontend/x/backup/fullbackup.html are working for me.
Phi1.
xcensus
08-23-2004, 05:20 PM
Hi,
When the resulting export files are restored to a users account, and then use the reseller to log into that persons account it falls back to the password prompt and fails to accept the original password from cpanel, changing the password works for the login, but clicking on login to account via the reseller still fails, any ideas why ? Something to do with the .shadow file maybe ?
l0rdphi1
08-23-2004, 09:50 PM
I think DA does that for all my users.
i.e., I'm logged in as 'admin' and "login" in to a reseller account, and then as the reseller, I try to "login" to a user account: I'm presented with DA's login screen.
The only way around this is directly logging in as the reseller's user via DA's "Show All Users" page.
Hmm..
Phi1.
xcensus
08-28-2004, 08:07 AM
Had alot of issues with transfering clients over, and then they have authentication problems with their pop3 accounts, reason appears to be login userid for pop3 on the old servers were
allowed to be username+dot.com and now have to be username@dot.com for DirectAdmin, so maybe a check to see if + is in email ID then change to @
Just a thought :)
xcensus
08-28-2004, 06:57 PM
Does email forwarders get backup up ? Seems for some reason (atleast for me) they dont get restored on the DA server.
BTW- Your Conversion tool rocks! So does Installatron
l0rdphi1
08-29-2004, 03:27 PM
xcensus,
Right NOW I think this tool does NOT convert mail forwarders. Only pop3's and the mail spool data.
Perhaps I can look into converting mail forwarders. I'll also convert +'s to @'s in pop3 logins :)
Phi1.
Hi,
The whole thing is very confusing to me and I am not a newbie. I have a reseller account on cpanel and one on DA. I want to move some accounts over from cpanel to DA and this is what I did, where did I go wrong?
1- create account in DA with the same username and password
2- create backup with cpanel GUI tool and ftp it to home directory on DA
3- upload the transfert script to the DA account after editing the .conf file
4- can't access the transfert script from http
hmm where did I screw up?
P.S: I can donate a copy of a backup if you still need one to experiment on
thanks
xcensus
09-01-2004, 07:56 AM
Originally posted by badr
Hi,
The whole thing is very confusing to me and I am not a newbie. I have a reseller account on cpanel and one on DA. I want to move some accounts over from cpanel to DA and this is what I did, where did I go wrong?
1- create account in DA with the same username and password
No need, just restore the cpanel converted file to any reseller you have created on the DA server using User Backups.
2- create backup with cpanel GUI tool and ftp it to home directory on DA
Yup
3- upload the transfert script to the DA account after editing the .conf file
Create a directory called import, export, move the cpanel backup into import, then execute perl da.directadmin.pl (cant remember its proper name lol) and you will have the fully converted file in export.
4- can't access the transfert script from http
Copy the exported file to the resellers directory, user_backups and then restore the backup.
hmm where did I screw up?
P.S: I can donate a copy of a backup if you still need one to experiment on
thanks
jumonjii
09-03-2004, 02:52 PM
What if you just want to transfer users from Cpanel to DA?
l0rdphi1
09-04-2004, 03:19 AM
Originally posted by jumonjii
What if you just want to transfer users from Cpanel to DA?
That is just what this script does :)
jumonjii
09-04-2004, 02:07 PM
Okay.
I was under the impression it was used to transfer resellers to DA.
l0rdphi1
09-05-2004, 10:13 AM
No, this script can only transfer individual users.
Phi1.
jumonjii
09-06-2004, 09:13 PM
Okay.
I don't understand the directions.
Do you have a step by step?
l0rdphi1
09-07-2004, 04:03 AM
What don't you understand?
Those are pretty close to step by step. :)
xcensus
09-07-2004, 04:51 AM
Hi l0rdphi1
Any new versions around the corner m8 ?
l0rdphi1
09-07-2004, 10:47 AM
Perhaps.
I've had a lot of requests to make this a DA plugin, or at least write a DA plugin interface for this tool. That may happen. :)
Personally, I think if I put together some real step-by-step instructions this tool may not need to be GUIized.
Perhaps I can look into converting mail forwarders. I'll also convert +'s to @'s in pop3 logins :) I need to do that yet too :)
Phi1.
sansobar
09-30-2004, 09:32 AM
hmm i got some problem copying the ftp acct over...
Cannot restore the ftp account for apache@wwwfrontier.net. You have reached your limit ().
Cannot restore the ftp account for dave@wwwfrontier.net. You have reached your limit ().
Cannot restore the ftp account for
Cannot restore the ftp account for ftp@wwwfrontier.net. You have reached your limit ().
how do i solve this?
albatroz
10-19-2004, 04:44 AM
How do you move SSL certficates? from Cpanel to DA?
jechilt
10-19-2004, 05:24 AM
I am getting this during the output of the examining stage:
Fround user decoju00..mv: can't stat source ./import/decoju00
.
Copying remaining files... mv: can't stat source ./import/decoju00/homedir/public_html
Is there something I am doing wrong?
l0rdphi1
10-19-2004, 11:39 AM
Originally posted by sansobar
hmm i got some problem copying the ftp acct over...
Cannot restore the ftp account for apache@wwwfrontier.net. You have reached your limit ().
Cannot restore the ftp account for dave@wwwfrontier.net. You have reached your limit ().
Cannot restore the ftp account for
Cannot restore the ftp account for ftp@wwwfrontier.net. You have reached your limit ().
how do i solve this?
I'm going to guess that the number of FTP accounts in the cpanel backup exceeds the limit on FTPs it provides.
l0rdphi1
10-19-2004, 11:39 AM
Originally posted by albatroz
How do you move SSL certficates? from Cpanel to DA?
No, currently this tool only transfers the bulleted things. (See OP.)
l0rdphi1
10-19-2004, 11:42 AM
Originally posted by jechilt
I am getting this during the output of the examining stage:
Fround user decoju00..mv: can't stat source ./import/decoju00
.
Copying remaining files... mv: can't stat source ./import/decoju00/homedir/public_html
Is there something I am doing wrong?
That's weird. Did you put a proper /scripts/pkgacct backup in export/?
jechilt
10-19-2004, 11:44 AM
we ran a backup from the user cpanel (SiteManagement--Backups) and ftp the file to the DA server.
l0rdphi1
10-19-2004, 12:11 PM
Originally posted by jechilt
we ran a backup from the user cpanel (SiteManagement--Backups) and ftp the file to the DA server.
Ah, yes. That IS supposed to work..
I just sucessfully created a backup from cPanel's ~/frontend/x/backup/fullbackup.html and it restored into DA fine.
Not sure why this wouldn't work for you. Are you sure what you made was a full backup?
jechilt
10-19-2004, 01:15 PM
let me log in as the actual user and try again. will post results.
EDIT for RESULTS:
The backup was run and FTP to the DA server. Ran the program and it ran just as it should. There must be some issue with connecting to the user cpanel from the WHM panel...?
Thanks for the response...sorry for my error.
Kind Regards...
jechilt
11-03-2004, 10:52 PM
we have one account that just refuses to cooperate.
When the perl script is run, it continues to bomb at the mailbox:
tina@xxxxxxx.commv: can't stat source ./import/chelti00/homedir/mail/tina/inbox
Once it hits this, the rest of the data is ignored so the 125mb account ends up being 7mb after conversion. any suggestions to resolve this?
l0rdphi1
11-03-2004, 11:13 PM
Hello,
Is chelti00 the user's name? In both cases where this converter failed there are two zeros tacked on the end of the username. I'm guessing those shouldn't exist?
If I'm correct, reply with the full name of the cPanel tarball that you're trying to convert to DA format.
Phi1.
jechilt
11-04-2004, 12:28 AM
chelti00 is the username.
here is what the script shows when it runs:
backup-11.4.2004_00-13-20_chelti00.tar.gz...
Fround user chelti00...
Switching to cheltina.com...
Collecting subdomains...
Building DNS...
Processing FTPs...
Collecting pop3 addresses...
tina@cheltina.commv: can't stat source ./import/chelti00/homedir/mail/tina/inbox
what do you suggest we change?
l0rdphi1
11-04-2004, 12:55 AM
Change line 356 (or thereabouts) of the perl script from:
`mv ${ROOT_PATH}import/$incoming_user/homedir/mail$cP_mbox_domain_bit/$login/inbox ${ROOT_PATH}export/$incoming_user/backup/$domain/email/data/pop/$login`; to:
`if [ -e ${ROOT_PATH}import/$incoming_user/homedir/mail$cP_mbox_domain_bit/$login/inbox ]; then mv ${ROOT_PATH}import/$incoming_user/homedir/mail$cP_mbox_domain_bit/$login/inbox ${ROOT_PATH}export/$incoming_user/backup/$domain/email/data/pop/$login; fi`;
Then give it another go.
jechilt
11-04-2004, 01:25 AM
looks like it is working great!
l0rdphi1
11-04-2004, 03:43 PM
Okay. I updated the version to .8.2 with this fix.
jechilt
11-05-2004, 11:58 PM
hi.
so far the tool is working great. also, after your last update, i accessed the user cPanel from my WHM. Ran the backup and then your script was able to convert it with no trouble. Previously, I was only able to back up as the actual user. (or maybe it was just a bad day..who knows?)
anyway, got a request for this great script.
could you build into the script the option to change the username before it creates the tarball for the DA backup restore?
Scenario: A user account was created with whois.cart. The cart software likes to create a user account name of username00.
Under my new system, I want to rid the username00.
When I tried to unzip my backup, it kept asking if I wanted to overwrite files and I did not so the unzip, change name, rezip is not a viable option unless a how to could be provided.
Thanks for the consderation :)
l0rdphi1
11-06-2004, 02:04 AM
I'll look into adding a renaming option. :)
Phi1.
jechilt
11-06-2004, 02:32 AM
hi....thanks!
right now, i am doing a test. ran your script and made the new da tar file. Opened the tar and made changes to the username in every instance i could find it. i am now going to do a restore and see if everything works...manually, of course;)
l0rdphi1
11-06-2004, 03:00 PM
Ah, good luck. :)
What I may end up doing is add a 'change username' option into the DA User Tool (http://www.directadmin.com/forum/showthread.php?s=&threadid=1220&highlight=da+user+tool). Not sure yet though. :)
Phi1..
jechilt
11-06-2004, 03:47 PM
thanks for the info...
the hunt has been pretty easy except with 2 account because they had a lot of email accounts and mySQL databases. Other than that...it has been pretty smooth. Your tool is a lifesaver!
gate2vn
11-10-2004, 01:20 AM
Sorry, I am new in DA. I have some questions
- do I have to create "user_backups" folder before running this tool?
- do I need to create end-user account before restoring?
- how can I restore backup file?
I have created reseller account, move converted file to user_backups folder, but cannot see it in DA.
Pls help. thanks,
synergy
11-18-2004, 08:51 PM
Originally posted by l0rdphi1
I'm going to guess that the number of FTP accounts in the cpanel backup exceeds the limit on FTPs it provides.
I am having the same problem. I have tried restoring the file as a reseller with unlimited FTP accounts and by changing the reseller account to a high number (like 1000 FTP accounts). The reseller is definitely not at any limit.
Could there be something else in the restore file I should look at?
Domain example.com Created
Domain Created Successfuly
Cannot restore the ftp account for example. You have reached your limit ().
Thanks in advance.
jechilt
11-18-2004, 09:28 PM
Originally posted by gate2vn
Sorry, I am new in DA. I have some questions
- do I have to create "user_backups" folder before running this tool?
- do I need to create end-user account before restoring?
- how can I restore backup file?
I have created reseller account, move converted file to user_backups folder, but cannot see it in DA.
Pls help. thanks,
i did not write the program but do use it.
i did not have to create a "user_backups" folder. It already existed in my admin (reseller) domain folder. (/home/admin/user_backups)
you do not have to create the end user account, but you do need to have a package type that the restore is going to go to.
in my case, i had new settings for the users account. for example, instead of only giving 2 ftp accounts, I give 4 and instead of unlimited mySQL, i change it to 25.
First thing I did to ensure the backrestore worked was to create a package in my restore that was bigger than any user had. When the backup restore was done, I then go back to the reseller user list and change the user package to the assigned package which changes all the setting to what i want.
there are a lot of ways to skin a cat...this was my method of choice. I did find this out too....i had a plan called "Gold" and when I did the conversion, the plan loaded for the user was "gold". Not knowing if case sensativity was an issue, I made the big plan and had that in the configuration file. Changed the plan on the user once restore was done.
The FTP limit is the user package limit you have set. change the setting to unlimited and it should import fine.
hope this helps...
Once the file is converted, it is put into the "export folder". I don't recall if there is any automation there, but I simply move the file from export to user_backups. Then, in the reseller backup, I am able to restore it. If you are not seeing the tar file in the reseller backup, then the file is not in the user_backups folder.
restore is done from reseller backup area. pretty straight forward.
jechilt
11-18-2004, 09:30 PM
it is not the reseller limit that is in question. it is the number of ftp account allowed in the package.
Originally posted by mcc235
I am having the same problem. I have tried restoring the file as a reseller with unlimited FTP accounts and by changing the reseller account to a high number (like 1000 FTP accounts). The reseller is definitely not at any limit.
Could there be something else in the restore file I should look at?
Domain example.com Created
Domain Created Successfuly
Cannot restore the ftp account for example. You have reached your limit ().
Thanks in advance.
Originally posted by thoroughfare
Nooo... an error :(
Unable to exact backup/user.conf from /home/admin/user_backups/xxxxx.tar.gz : Error while extracting backup/user.conf to /home/admin/user_backups/xxxxx as admin :
HTH,
Matt
PS xxxx = the username
I am having exact error. How can I pass this?
thanks,
Nordavind
11-22-2004, 08:38 AM
But how about coverting all users and resellers and their whole dala like mails, pop3s, ftps, databases.... etc. from Linux with cPanel to FreeBSD with DA ? How is this possible ? Will this script convert everyting at once or I have to move users with their system logins and passwds and covert it to FreeBSD format and then after this restore backups ? Also can be there done one backup for everyone or I have to do it separately every user and every reseller ?
P.S. Sorry for my bad english but I hope that somebody will understand me and will help. because this is very urgent for me :/
ticky
11-23-2004, 06:55 PM
I can restore the files, but anything to do with passwords mess up. Like after I restore, the password to the account doesn't work, nor does any password protected directories.
Anyone know how to solve this?
Also I have the same ftp limit problem as mentioned above. What is this? and how do I fix it?
Thanks.
Georg
11-29-2004, 05:08 AM
Hello!
I am very happy that I found a conversion tool like this. I am just having some questions that I cannot find answers for:
1. How do you select in Cpanel server which accounts to move? Do you have to create those tar backups with every user separately?
2. Is there some readme where descriptions for config file values are listed?
3. Does it now copy MySQL as well without problems?
Thank you a lot!!
S2S-Robert
11-29-2004, 03:03 PM
There is some MySQL issue with this apparently:
Domain onlineenquetes.nl Created
Domain Created Successfuly
Domain studenten-onderzoek.nl Created
Domain Created Successfuly
Domain studenten-onderzoeken.nl Created
Domain Created Successfuly
That user already Exists
That user already Exists
Unable to restore database student_phpesp.sql to student_phpesp : ERROR 1067 at line 30 in file: '/home/student/backups/backup/student_phpesp.sql': Invalid default value for 'expiration'
I'm using the latest cPanel/WHM perhaps there could be something wrong there?
S2S-Robert
11-29-2004, 03:19 PM
In order to make sure there was nothing wrong with the mysql, I tried to redo it all. I removed the accounts, dropped the mysql databases and started all over again.
I also used "repair" in cPanel to make sure the databases were ok.
here are the errors for the 2nd run:
Unable to restore database student_box01.sql to student_box01 : ERROR 1050 at line 26 in file: '/home/student/backups/backup/student_box01.sql': Table 'mst_block_status' already exists
That user already Exists
Unable to restore database student_box02.sql to student_box02 : ERROR 1050 at line 26 in file: '/home/student/backups/backup/student_box02.sql': Table 'mst_block_status' already exists
That user already Exists
Unable to restore database student_mst.sql to student_mst : ERROR 1050 at line 26 in file: '/home/student/backups/backup/student_mst.sql': Table 'mst_block_status' already exists
Unable to restore database student_phpesp.sql to student_phpesp : ERROR 1067 at line 30 in file: '/home/student/backups/backup/student_phpesp.sql': Invalid default value for 'expiration'
Georg
11-30-2004, 01:07 AM
Oh, so it means there is a bug right now in the conversion tool..?b:( I really hope it will work as we bought a new DirectAdmin server and will get it working tomorrow to move on customers from old cPanel box...
Anyway, thanks to the developer for this great converter.
Originally posted by hung
I am having exact error. How can I pass this?
thanks, Same here, bug? Or did cpanel change it's backup system (I doubt it, since the last update of cpanel was a while ago)?
I used a GUI-made backup, btw.
Oh, and when it's working, you're my saviour :D. Can I donate somehow :P?
Small question along with the problem: when are backups actually restored? It seems it's not done instantly. Since I'm new to DA: is there anyway to do this instantly?
Jochem
Georg
11-30-2004, 01:42 PM
Need help too!! Willing to donate! :D Please.
l0rdphi1
11-30-2004, 05:55 PM
Originally posted by XBL
when are backups actually restored? It seems it's not done instantly. Since I'm new to DA: is there anyway to do this instantly?
There is a tool in your DA reseller-level panel that restores backups. :)
As for updating this tool, I am busy at the moment, but I do have plans to work out any replicatable bugs in the near future. Contact me by PM if you have any specific requests.
Phi1.
S2S-Robert
12-01-2004, 12:58 AM
Well you've seen my bug, I can give you the cPanel backups if you like?
Lem0nHead
12-06-2004, 08:59 PM
this didn't work here
it generated the file but, when i tried to restore it on DA, it said it would notify me when it's ready
the .tgz has 250 MBs... right after i run the restore, i checked "top" and "gzip" was there for just 3 seconds (it needs at least 15 seconds to uncompress this file on my server)... and i didn't receive any error message
still after 20 minutes, the account wasn't create
suggestions?
hostweb
12-30-2004, 12:41 AM
Hello is there a fix for the pasword problem ?
After converting a user, i can login in ftp whith the old pasword but i can't not login in DA user control panel
sorry for the bad language :)
hostweb
Hi,
Can anyone assist me with this moving , I have around 70 clients on cpanel box and I wish to move it on DA box...
Problems :
1. I can't run /scripts/cpbackup on cp box
2. How do I configure defaults.conf
Regards,
Joeh2k
01-31-2005, 12:58 AM
Hi, has anyone used this on cpanel linux to da freebsd or freebsd to freebsd?
Did you have any issues or what were the problems?
Thanks
Joe
----
Power Core Networks Limited.
http://www.power-core.net
e-view
02-20-2005, 01:39 PM
wondering, its still under developement?
serdar
02-21-2005, 02:30 AM
Shall we begin? (y/n) [y] y
No tarballs attempted/converted.
~fin.
--
what must i do?
S2S-Robert
02-21-2005, 04:30 AM
I don't think it's under development anymore, perhaps if people start paying for it the developer would have time to work on it. I can't imagine it would be that hard to keep the tool up to date and I do believe a lot of folks are willing to pay a small fee for it.
serdar
02-21-2005, 12:40 PM
we converted the accounts from cpanel to DA but account passes are not working.
what must we do?
serdar
02-22-2005, 01:13 AM
we complated to transfer accounts.
everything is working.
but e-mails didnt copy.
is anyone know the reason?:confused:
We moved from cPanel to DA sunday, it went ok, but we had some problems. I'll describe below how we did it, and make some changes to our story, so it goes even more smooth (we had some minor problems).
First, 24 hours before you move, change all the TTL's on dns zones from 14400 (4 hours) to 900 (15 min). This is to make sure you can easily change the DNS, without a lot of waiting for your customers to use the server (and a backup getting older ;)). You can easily do this by doing the following:
1. Login to old server as root
2. cd /var/named
3. perl -pi.bak -e "s/14400/900/g" *.db
4. /etc/rc.d/init.d/named restart
source (http://forums.cpanel.net/showthread.php?t=18294)
Now, lets start getting our stuff together to move it to the new server. Because it can take a while, I suggest to start around 0.00am, so you'll be finished (depending on the transfer speed and accounts) somewhere in the morning (for us, it was finished when I got out of bed).
To get this done, you first need a list of all your users per package!. Put them on one line, like this:
user1 user2 user3 user4
Next we wrote a nice bash script for creating the accounts and moving them:
cat > backup.transfer.|PACKAGENAME|
for user in user1 user2 user3 user4
do
/scripts/./pkgacct $user
done
for user in user1 user2 user3 user4
do
ftp -u ftp://admin:admin_pass@new_server:21/user_backups/|PACKAGENAME|/cpmove-$user.tar.gz /home/cpmove-$user.tar.gz
done
Replace |PACKAGENAME| with the packagename you are creating it for (you should have one backup.transfer per package, and a list of users owning that package). What it basicly does is first creating the backup for each user by running pkgacct, these will be stored in /home. After that it transfers the package for each user to /home/admin/user_backups/|PACKAGENAME|. Oh, and the cat > backup.transfer just creates the file to run ;).
Next chmod the files to 755:
chmod 755 backup.transfer|PACKAGENAME|(for each pacakge-file).
You're good to go!
Setup a cronjob to excute all the files at an appropiate time. Example:
57 23 19 2 * /home/cpanel/./backup.transfer.Large >> output.txt
This cronjob will execute on 23:57 (11.57pm) on the 19th of februari. You can simply add the cronjobs by doing 'crontab -e' and put them there on a new line.
Now, we got some other work to do. We need to make sure we can restore the accounts. Because there appears to be some problem with the tool, the passwords aren't restored, and you can't restore the backups if the accounts don't exist on the DA server (sucks, yes).
What we did, is the following: we created a file with all the users on one, line, having some info with them. Like this:
username|email@address.ext|domain.ext|package|password
Do this for every user, each on a line. The username is the username they will use in DA, the e-mail address is the e-mail address they will receive the mail with their info on, the domain is the domain they use for DA, and the package is the package they will use in DA (make sure it exists in DA!). We will use this in a later stage to create the accounts (btw, if you want the passwords auto generated, use this script (haven't tested it)):
<?php
$file = "userlist.txt"; // the file with the users formated like above
$new_file = "new_userlist.txt"; // create the file in samedir as userlist.txt, and chmod it 666
$users = file($file); // grab each user-line in een array
foreach($users as $user) { // loop trough all the users
$user = explode("|",$user);
// Generate password
$totalChar = 8; // number of chars in the password
$salt = "abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789"; // salt to select chars from
srand((double)microtime()*1000000); // start the random generator
$password=""; // set the inital variable
for ($i=0;$i<$totalChar;$i++) { // loop and create password
$password = $password . substr ($salt, rand() % strlen($salt), 1);
}
// make the new user_list
$new_user = $user['0']."|".$user['1']."|".$user['2']."|".$user['3']".$password."\n";
$handle = fopen($new_file, "a");
fwrite($handle, $new_user);
fclose($handle);
}
?>
Put this in a web-enabled dir, together with the file with the users, and use this script to rebuild it with passwords in it.
To make it even better, we also automate the creation of the user accounts! All done trough php (I'm a php freak :P). The script I wrote for this simply creates the user accounts, puts the success accounts in success.txt and the failed accounts in failure.txt (so you can create them manually). It also sends out an e-mail to your users on success, so they have the new info about their account.
You need the php API mentioned in this thread (http://directadmin.com/forum/showthread.php?s=&threadid=258&perpage=20&pagenumber=5) (post 4 of page 5). Put the dirs 'config' (edit the config.php in it) and 'protocol' in the same dir as the script below, together with the userlist.txt and success.txt+failure.txt (both chmodded 666).
<?php
// some vars:
$file = "userlist.txt"; // the file with the users formated like above
// Get userinfo:
$users = file($file);
// Let's connect to DirectAdmin
include 'config/config.php';
include 'protocol/httpsocket.php';
$Socket = new HTTPSocket;
$Socket->connect($siteurl,$siteport);
$Socket->set_login($adminusername,$adminpassword);
// {admin_username} and {admin_password} are not specifically your administrative DA user,
// but rather the user that you want to own this new user.
foreach($users as $user){
// Order userinfo
$userinfo = explode("|",$user);
$username = $userinfo['0'];
$email = $userinfo['1'];
$passwd = $userinfo['4'];
$domain = $userinfo['2'];
$package = $userinfo['3'];
$notify = $no;
// Create the account
$Socket->query('/CMD_API_ACCOUNT_USER',
array(
'username' => $username, // The User's username. 4-8 characters, alphanumeric
'email' => $email, // A valid email address
'passwd' => $passwd, // The User's password. 5+ characters, ascii
'passwd2' => $passwd, // Password double check. 5+ characters, ascii
'domain' => $domain, // A valid domain name in the form: domain.com
'package' => $package, // One of the User packages created by the Reseller
'ip' => $ipaddress, // One of the ips which is available for user creation. Only free or shared ips are allowed.
'notify' => $notify, // yes or no. If yes, an email will be sent to email
'action' => 'create',
'add' => 'Submit'
));
$result = $Socket->fetch_parsed_body();
if ( $Socket->get_status_code() != 200 || !empty($result['error']) ) {
// Failure
$handle = fopen("failure.txt", "a");
fwrite($handle, $username."|".$email."|".$domain."|".$package."|".$passwd."|".$result['text']."|".$result['details']."\n");
fclose($handle);
echo $handle, $username."|".$email."|".$domain."|".$package."|".$passwd."|".$result['text']."|".$result['details']." FAILED <br />";
} else {
echo $handle, $username."|".$email."|".$domain."|".$package."|".$passwd."|".$result['text']."|".$result['details']." SUCCESS <br />";
// Message to e-mail on success: should contain at least the new password: $passwd, please escape double quotes like this: \"
$subject = "Your account is moved";
$message = "Dear Customer,
We succesfully moved you to the new server, your account settings will be restored within a few minutes.
Your account information:
DirectAdmin URL: http://".$domain."/config.
DirectAdmin Password: ".$passwd.".
DirectAdmin username: ".$username."
With best regards,
Some hosting-company (www.somecompany.com)";
// Success
$handle = fopen("success.txt", "a");
fwrite($handle, $username."|".$email."|".$domain."|".$package."|".$passwd."|".$result['text']."|".$result['details']."\n");
fclose($handle);
mail($email, $subject, $message,
"From: yourmail@yourcompany.com\r\n" .
"Reply-To: yourmail@yourcompany.com\r\n" .
"X-Mailer: PHP/".phpversion());
}
}
?>
We're all set, what do we have?
- A cronjob backing up all your accounts and ftp'ing them over to your new server.
- A phpscript + the needed info to create all the accounts.
- The cpanel->da tool somewhere working on your server (not covered in this post, but you're reading this thread, so I assume you have it).
Now it's time to test, if you haven't done so already. Pick a few customers to test with (they will few 'special' if you choose them as beta-tester), or try it with a few accounts of your own. Everything is working? Good, then it's time to start on the big move. Exciting!
The backup + ftp proccess is fully automatic, and when it's done, you put the first batch of users in the import dir (you convert them per package). Set up your default.conf (change the package) and start converting them. When it's finished, move the contents of the export dir to /home/admin/user_backups and move the contents of import to /home/admin/cpanel_|PACKAGE| (I suggest you keep the backups for a while). Do this for every package+user and you should have all the backups converted in your /home/admin/user_backups dir.
Now it's time to inform the users about their new home being ready. Run the php script which creates the accounts. Once it's finished, you log on to DirectAdmin, go to the Reseller part, to the backup-part and select all the backups to restore.
Change the old server to point to the new server, so all the users will use the new server in 15 minutes:
1. Login to old server as root
2. cd /var/named
3. perl -pi.bak -e "s/[oldip]/[newip]/g" *.db
4. /etc/rc.d/init.d/named restart
source (http://forums.cpanel.net/showthread.php?t=18294)
That's it, the move is done!
Now, this sounds cool of course, but there are some things not working after moving from cpanel to DirectAdmin. I would suggest to inform your users about it. The following problems occured with us:
- Spam Assassin settings disappeared.
- Addon domains didn't work too well all the time (you can see wether a problem with an addon domain will show up, if you see an error while converting the package).
- Parked domains: the same, sometimes they didn't get moved.
- MySQL users: if a MySQL user in cPanel is moved for multiple databases, it will only work for one database.
- FTP Accounts: sometimes these didn't get moved either (not sure wether they didn't move at all).
- Cronjobs: nope, couldn't get these converted to DirectAdmin.
- Mailing lists: same as with the cronjobs.
- E-mail forwarders: didn't convert either (normal inboxes did move, w/out the mail tho).
- Autoresponders: same as e-mail forwarders.
- Catch-all (default address) settings: must be set again by the user, if it was customized.
Any questions or suggestions? Post them below :-).
Jochem
//edit: fixed some typo's.
dxoxb
03-04-2005, 09:30 AM
1. Login to old server as root
2. cd /var/named
3. perl -pi.bak -e "s/[oldip]/[newip]/g" *.db
4. /etc/rc.d/init.d/named restart
I am a complete newbie to ssh and linux command. Please do tell me what does these lines do. I got really freak out, when I enter the 3rd line and a whole page of "can't rename" appear. :( I am kind of stuck now thinking should I be continuing the 4th line (hand shaking now :().
I am a reseller of another hosting company and I don't want to be responsible crashing their server :(
Originally posted by dxoxb
I am a reseller of another hosting company and I don't want to be responsible crashing their server :( [/B]
Login to old server as rootSince you're reseller, you don't have root permissions and that way, you aren't able to edit the zones. You need to edit the zones by hand, replacing the old IP with the new one... we've done this on another server, 6 months ago or something. Yes, it sucks.
Jochem
dxoxb
03-04-2005, 09:44 AM
That's really fast respond XBL :)
Ok, now I am totatlly convince that I should not do this transfering stuff. (probably manually). anyway I think it is way too difficult for newbie at this point of the development.
But appreciate this work :)
You must have some basic knowledge of running a server, commandline and a bit of php (at least know what's going on).
If you don't have a lot of accounts, it certainly better to do it manually, because there are some bugs in the backup conversation. But after +/- 40 accounts it's too much work to do it manually, imo. We had to move around 170 accounts...
Jochem
dxoxb
03-04-2005, 10:00 AM
Probably that is why I hv been a reseller all this while. I have close to zero knowledge of running a server :P and I got about 300 domain name to transfer :P
I guess I am going to be stuck with my hosting company for a while (hopefully not too long) and really hope that this transfer stuff can be a standard feature in DA. I probably get another license if this is happening. :)
dxoxb
03-18-2005, 08:49 AM
I've root access with SCP to a existing Cpanel server. Any chance that I can migrate some user account over? if yes where can I look out for them?
drmike
03-19-2005, 10:32 AM
Originally posted by dxoxb
I've root access with SCP to a existing Cpanel server. Any chance that I can migrate some user account over? if yes where can I look out for them?
You run the tool on the backup files from your old server. It's not a direct migration method. You have to do some work for it to work.
Do note that the username and password must be the same on both boxes. Also received emails do not transfer.
-drmike
honesting
04-29-2005, 04:20 AM
hello, i'm new here, i'm looking for urgent help moving accounts, i'm trying and getting errors, if some one knows how to do it please pm me, i pay, thanks.
drmike
04-29-2005, 07:05 AM
Originally posted by honesting
hello, i'm new here, i'm looking for urgent help moving accounts, i'm trying and getting errors, if some one knows how to do it please pm me, i pay, thanks.
Would help if we knew the errors.
-drmike
honesting
04-29-2005, 10:02 AM
I always get this error while try to restore the cpanel transfer to da file.
Ver message 000000010
An error occurred during the restore.
Unable to exact backup/user.conf from /home/admin/user_backups/zollerco.tar.gz : Error while extracting backup/user.conf to /home/admin/user_backups/zollerco as admin :
Cannot read /home/admin/user_backups/zollerco/backup/user.conf : Unable to open /home/admin/user_backups/zollerco/backup/user.conf for reading.
drmike
04-29-2005, 10:13 AM
Originally posted by honesting
I always get this error while try to restore the cpanel transfer to da file.
Ver message 000000010
An error occurred during the restore.
Unable to exact backup/user.conf from /home/admin/user_backups/zollerco.tar.gz : Error while extracting backup/user.conf to /home/admin/user_backups/zollerco as admin :
Cannot read /home/admin/user_backups/zollerco/backup/user.conf : Unable to open /home/admin/user_backups/zollerco/backup/user.conf for reading.
zollerco is the name of your user account on the old box, right?
-drmike
honesting
04-29-2005, 10:23 AM
yes, the account it's not create in the new box with directadmin, and i restore using admin reseller.
i do (all in da box):
1. get the cpanel backup from a remote ftp
2. copy to import folder
3. export using the script, i change only the ip, dns and admin like reseller, not Admin, could be this?
4. then copy the exported file to /home/admin/user_backups
5. enter like reseller in da and try to restore
then i always i'm getting this error, i try differents files from differents servers.
@honesting: The accounts are not created when restoring a backup. You first have to create the account with the same username and then there's no problem restoring it. Check one of my previous posts, where I explain how to restore cpanel-to-DA converted backups.
Jochem
reitertrading
06-07-2005, 01:22 AM
Hi
After building the backups, on cpanel machine, moving on da machine, and using l0rdph1l script, I 've go the backups in da format. Everything good until now.
I create some resellers and I started the restore operations from respective resellers accounts.
Finally, I have 2 problems. The restore operation did not create the ftp accounts, and, in case of only one domain, da did not show any subdomain. The last case is not so important, but the missing ftp accounts is. There are arround 3000 ftp account.
Now, there is anybody that can sugest me a solution for this issue ? Searching on this forum after something related, didn't revealed anything helpfull. Thank you.
R. Thomas
malinrepair
06-28-2005, 06:30 PM
I'm getting the following error:
Examining oxyanion.tar.gz...
Fround user oxyanion..mv: can't stat source ./import/oxyanion
.
Copying remaining files... mv: can't stat source ./import/oxyanion/homed ir/public_html
Creating domain pointers...
Translating any Crontab entries... 0 total..
Dumping databases...
Creating DirectAdmin tarball...
Cleaning up...
Success!
1 tarballs attempted/converted.
~fin.
Dustin
07-07-2005, 12:33 AM
I am really new to this .. and I don't know where to put these files. I know you don't put them in the "public_html" directory .. because I've tried and they don't work lol
My old server uses cPanel and my new server uses DirectAdmin and I want to transfer all of my sites seamlessly.
I do not have root access, but I do have reseller access on both servers.
I have downloaded the backups from the GUI in cPanel backup .. but what do I do with it?
WHERE DO I RUN THE CPANEL TO DIRECTADMIN CONVERSION TOOL????
Thanks!!
Dustin
07-08-2005, 01:31 AM
Nevermind ... my host helped me out. Thanks for the help:)
koliber2
07-09-2005, 02:22 PM
Is this script helps me when i must migrate CP-DA with change a server location (so ip was also change)?
ChuckL
08-09-2005, 09:14 AM
Will there ever be instruction on how to config and run this. Instead of trying to get bits and peices from 9 pages of messages.
Sorry I'm a newb and a little lost.
nobaloney
08-09-2005, 05:43 PM
Originally posted by ChuckL
Will there ever be instruction on how to config and run this. Instead of trying to get bits and peices from 9 pages of messages.
The script is not official DA software; it's an effort by one author, and then a community effort to explain, debug where necessary, and document it.
So the short answer is "not unless someone volunteers to do it".
Jeff
koliber2
09-20-2005, 03:06 AM
how can i convert cp backup to DA files if i don't have root password to old machine? please help.
nobaloney
09-20-2005, 09:54 PM
The newest versilon of the conversion tool will work fine on the DA server. We've done it that way.
Jeff
chielsen
09-29-2005, 03:47 PM
The domain files are not placed under the domain, what could be wrong?
I see the files are in the da backup tars...
getUP
11-02-2005, 09:18 AM
This does not include IMAP restore.
Can this be added asap? I'll buy ya an evening of beer ;)
Tried it myself without any luck.
Have to switch over the last remaining cPanel server to DirectAdmin anytime soon.
Thanks.
getUP
11-02-2005, 10:43 AM
Seems to be going fine now.
My latest version with IMAP support:
# wget http://www.l0rdphi1.com/tools/da.cpanel.import.tar.gz
# wget http://83.98.148.16/imap_da.cpanel.import.pl
# tar zxf da.cpanel.import.tar.gz
# mkdir import export
# chmod +x imap_da.cpanel.import.pl
Customize defaults.conf
# ./imap_da.cpanel.import.pl
And follow on-screen instructions.
Cyvillian
11-09-2005, 06:23 PM
I seem to be having some problems transferring over. This appears as the system message for all of the accounts that I'm trying to migrate over:
Unable to restore database xxxx_leadsdb.sql to xxxx_leadsdb : ERROR 1045 (28000): Access denied for user 'xxxx'@'localhost' (using password: NO)
Unable to restore database xxxx_trackingdb.sql to xxxx_trackingdb : ERROR 1045 (28000): Access denied for user 'xxxx'@'localhost' (using password: NO)
Database '' doesn't belong to you.
Does anybody have any ideas?
Arcadius
11-12-2005, 05:21 AM
Hello,
can anyone help ASAP!
I need to migrate from:
WHM 10.8.0 cPanel 10.8.1-C29
RedHat Enterprise 3 i686 - WHM X v3.1.0
to
DA 1.254
on FreeBSD 5.4!
Anyone for help, solution, scripts.. but it MUST work.. I can not fail or work a week under this transition.
The worst is I have no contact with Cpanel /only DA , but Client wants to move in and I need to convince him that DA is better.
LMK
A.
P.S. I know that is a lot of post here, but some of them very old.. what you tool you suggest to use with above versions of Cpanel, DA and os.?
mikron15
11-12-2005, 07:52 PM
Heyah,
i tried using your script but facing this error:
I ran the script on my old server which had cpanel backup files and it created the new DA tar files with 1 common error for all my client accts:
Shall we begin? (y/n) [y] y
Examining a2a.tar.gz...
Fround user a2a..mv: cannot move `./import/a2a' to a subdirectory of itself, `./import/a2a/a2a'
.
Switching to a2a.smart-host.us...
Collecting subdomains...
Building DNS...
Processing FTPs...
Collecting pop3 addresses...
Copying remaining files...
Creating domain pointers...
Translating any Crontab entries... 0 total..
Dumping databases...
Creating DirectAdmin tarball...
So thinking that error can be avoided, i continued by ftping that file to my DA server ( /home/admin/user_setup) and then restoring it. I received the following error :
Subject: An error occurred during the restore. Today at 17:45
Unable to exact backup/user.conf from /home/admin/user_backups/mikron15.tar.gz : Error while extracting backup/user.conf to /home/admin/user_backups/mikron15 as admin : /bin/tar: /home/admin/user_backups/mikron15: Cannot chdir: No such file or directory
/bin/tar: Error is not recoverable: exiting now
Cannot read /home/admin/user_backups/mikron15/backup/user.conf : Unable to open /home/admin/user_backups/mikron15/backup/user.conf for reading.
Any help or suggestion?
hostpc.com
11-12-2005, 09:16 PM
Sounds like user.conf is corrupt... have you tried making another backup copy?
We use this script quite often, and have never experienced an issue with it.
mikron15
11-12-2005, 09:20 PM
EDIT: silly me, i had wrong folder permissions ( was set as root), changed to reseller ownserhsip and it seemed to work
It doesn't seem to copy the clients email accts. Like the email accts exist, but 0kb email usuage. IS there a way i can do this manually?
Another quick q, Does their passwd get transfered too or i have to reset all accts passwds?
getUP
11-13-2005, 04:27 AM
Mikron, the changed script I posted does copy e-mail accounts.
Passwords are transfered. No need to reset them.
mikron15
11-13-2005, 06:25 PM
Thanks getup,
I am not sure how i skipped ur earlier post.. It works great. Alsmot done transfering half the clients.
Thanks alot guys. This tool saved me lotsa time!
selfwebhosting
01-12-2006, 06:00 PM
Originally posted by jechilt
I am getting this during the output of the examining stage:
Fround user decoju00..mv: can't stat source ./import/decoju00
.
Copying remaining files... mv: can't stat source ./import/decoju00/homedir/public_html
Is there something I am doing wrong?
I had the exactly the same error and it happened when I ran the script on the DA server trying to convert cPanel backups (made using fullbackup.html under reseller cPanel login which allows me to access all my users cPanels) to DA backups.
But accidentally I made the script eventually work!!! Let me explain...
Initially I thought the cPanel backup file has to be renamed to username.tar.gz to match that of the DA backup file (no need to do this in fact). Anyway, having not fully understood the instructions, I renamed the cPanel backup file - luckily I did it using a FTP client which in fact created a folder (with the same name as the part before .tar.gz) and explode everything to the folder - I will call this folder the MAGIC folder which I will mention later on.
Anyway, I did not know this to be a gain :-) so I proceeded to run the conversion script and restored the converted files on the DA server. But I found it restored only the username along with other things. The most obvious sign of the conversion not working is the domains field is BLANK which means the domain name and maybe other things did not get converted.
So I thought it must be the fact I renamed the cPanel backup file which was not necessary. So I thought... how could I recreate the tar.gz file with exactly the same name?
I used the tar and gzip commands to tar the files and folders I found it the MAGIC folder. So basically I just recreated the cPanel backup file by exploding and imploding it.
Now I ran the cPanel to DA backup conversion script with this recreated file and it worked!!!
I have not checked things other than domain name - will let you know later on. At least the script saves me tens of hours of work! I am so excited to share this with you. If you would like to know how to re-create the cPanel backup file. Here are the step-by-step procedures...
Note all the following steps should be done by login to the DA server via SSH (I use putty.exe to access SSH). You need to have the root password for the server.
(1) Extract things in the cPanel backup file to a folder - my DA server accidentally did it for me when I tried to rename the file :-)
(2) Go to this folder where files and directories are extracted to, and then type...
tar -***f backup-1.11.2006_17-59-21_username.tar.gz *.*
This tars mainly mysql.sql - note in my case backup-1.11.2006_17-59-21_username is the name of the folder into which my DA server extracted the cPanel backup file into.
Then you need to issue this command:
tar -***f backup-1.11.2006_17-59-21_username.tar.gz *
This will tar all the files and folders which do not have an extension name.
(3) Zip the new .tar file by typing this...
gzip -c backup-1.11.2006_17-59-21_username.tar > backup-1.11.2006_17-59-21_username.tar .gz
Now you have recreated the cPanel backup file!
Your next job is to move or copy this file to the import folder and run the script again. You should have no problem converting :-)
The fact this works indicates that cPanel backup file is slightly different from what the script author understood it - wish that he could update his script and offer to sell!
Enjoy!
selfwebhosting
01-12-2006, 06:04 PM
Just a followup about my conversion results - even the password is converted properly!!!
Thums up!
selfwebhosting
01-15-2006, 03:51 AM
OK, after a thorough check into the transfer, I find the following items are not (or cannot?) restored after cPanel to DirectAdmin transfer:
(1) Passwords for protected directories
(2) Passwords for MySQL databases (the databases are transferred properly using my method, but not the passwords)
I will keep you updated with more findings if there is any.
selfwebhosting
01-24-2006, 12:38 PM
After rebuilding the server, I tried to follow my previous unique approach of extracting and tar/gzip the backup files but it does not work anymore!
Eventually I tried to use the backup files directly (created using cPanel's Full Backups function - fullbackup.html) and it turned out this simple approach (just as the author suggested) worked!
Don't know why. Maybe either the author has made some modifications (I downloaded the script fresh this time) or cPanel has changed its way to do full backups.
So just follow what the author suggested in the first place. If it did not work, then try my approach.
White Sox
01-29-2006, 05:07 PM
Examining backup-1.29.2006_17-24-07_koclises.tar.gz...
Fround user koclises..
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
mv: cannot stat `./import/backup-1.29.2006_17-24-07_koclises': No such file or directory
.
Copying remaining files... mv: cannot stat `./import/koclises/homedir/public_html': N
o such file or directory
Creating domain pointers...
Translating any Crontab entries... 0 total..
Dumping databases...
Creating DirectAdmin tarball...
Cleaning up...
Success!
1 tarballs attempted/converted.
~fin.
This is the error i am getting. Why is this happening?
nobaloney
01-29-2006, 07:58 PM
The errors are self-explanatory:
cannot stat and No such file or directory mean there's no file so the program can't do anything.
Why is there no file? That I have no idea. But here's a clue
gzip: stdin: not in gzip format
This means the filename ends in .gz but it's not gzipped. So the unzip command can't unzip it.
Jeff
pug123
02-05-2006, 03:35 PM
Hello!
I've tried the script. Everything works ok besides :
1) FTP accounts are not transferred :( However they work!!! But they are not visible in panel. Where they are?
2) Password protected directores - not work at all
regards,
mart
nobaloney
02-08-2006, 07:20 PM
I'd ask DA support.
Jeff
David C
03-22-2006, 07:44 AM
I have a domain that I would like to transfer from Cpanel over to DA.
I would like that domain to be under my "admin" user level instead of being a user under my reseller level.
Anyway for me to do that?
jmstacey
03-22-2006, 10:06 AM
Admin has it's own reseller and user level...
David C
03-22-2006, 04:29 PM
yes, but when I restore the backup of this site, it will not be seen under the username "admin"'s user level instead, it will be just a user under reseller.
ProHS
03-29-2006, 10:31 PM
This would be nice if this could be made in to a plugin so DA resellers could convert CPanel backups.
kris1351
04-07-2006, 03:06 PM
How well does this utility work for mass transfers? I have about 2000 accounts across several servers I am going to convert from CPanel to DA and hope to make it as painless as possible for the customers.
Any tips/gotchas you have please post as I get ready for this.
if im not wrong, just place all the backup you wish to convert into the import and it will all be converted for you.
kris1351
04-07-2006, 08:21 PM
I know how the script works, was looking for tips/advice/gotchas before I start the conversions.
moazedi
04-10-2006, 12:09 AM
One of my sites have 350Mb backup and i try to convert it with da.cpanel to DA format. But after convertng, it is resized to 40Mb!
Therefore backup isn't correct and i can't restore it correctly!
Please help me!
This is very important!
Additionaly, please tell me how can i move all of my backups from Cpanel to DirectAdmin manualy without using this tools!
waylander
04-20-2006, 12:48 PM
Hi guys,
I need some help, as I am stuck...
I have CPanel in one server, but I wish to change to DA.
I have followed the Instructions to copy on to the DA server, but when I get to the part:
- Customize defaults.conf (tool will not work if you fail to do this)!!!
I am stuck, as I do not know what I am supposed to do here...
I would appreciate it if anybody could give an idea...
Best wishes to all.
waylander
04-24-2006, 01:02 AM
Hi,
OK, I have changed the file.
I have tried a couple of domains and they convert.
Success!
Now, how do i install it into the client account??
Thanks
nobaloney
04-24-2006, 02:58 PM
They should now be standard DA backups which you can restore.
Jeff
waylander
04-24-2006, 03:57 PM
Hi,
Thanks for the answer...I thought nobody was going to do so, and I was getting really worried...:-)
I am backing up all accounts in WHM.
It is over 200 clients, so it is very slow.
Once I have done it I will import direct with wget from public_html...
WIll keep you posted, as I need to have them all done by tomorrow afternoon my time, in about 20 hours fro now.
Thanks and regards,
justahost
04-28-2006, 02:05 PM
Phi1.
Cracking script you have there!
Ran for the first time this evening and it all went smooooooothly.
Cheers again!
Ryan
waylander
04-29-2006, 02:37 AM
Well,
I have migrated ALL accounts over to the DA server, and everything has gone right.
Only 2 backups have given us problems, and seem to be worng.
I think its the backup itself, not the script.
THANK YOU FOR YOUR HELP.
I could not have done it without the script.
Regards,
nango
05-14-2006, 07:34 AM
Hi
I'm new user of DA (Direct Admin)
I read this posts about converting tool for cpanel to DA
But in this 11 pages I did not found any good step by step explanation or something like this and I don't want risk,
Please check with me if something is wrong tell me. I want to start transferring sites
1-on CP server I must take backup by this coomand:
root@hostname# /scripts/pkgacct home/site1
(I use SSh because Cp/WHM is not work)
this command make a bakcup from all parts of a website like emails,ftp accounts,MySql banks,web files and.... on a new file that file name is: cpmove-site1.tar.gz
2- I must move this backup file by ftp(cpmove-site1.tar.gz)
to DirectAdmin Server and now finished my job on cpanel server.
If this is true where i must add this file on DA server?
3- login to Da server and run this for get tools:
root@hostname# wget http://www.l0rdphi1.com/tools/da.cpanel.import.tar.gz
A question on this part: where I must extract or copy this file
Should I get it in root or /home?
4-
tar zxf da.cpanel.import.tar.gz
5-make 2 dirctory by this command
root@hostname# mkdir import export
questin: where I must create this folders root or /home
or maybe it's not important where?
6-open file defaults.conf with an editor like vi and change setting of this file,I think this is host plan cofiguration like new plan creating.
7-last command is:
perl da.cpanel.import.pl
If I must do somethings more or less please guaide me.
Thanks:)
nango
05-16-2006, 02:59 PM
Hi
Thank you all for many helps;)
I convert my sites successfully,I must tell this tool is wonderful,
Many thanks to l0rdphi1
If anyone want to do this
first on cp server make bakeup from your user files in /home/sitex
by this command:
root@server# /scripts/pkgacct /home/sitex and you dont need to install or download this tool to cp server
2-move backedup files to DirectAdmin server
3-in DA use wget to download tool by this command:
wget http://www.l0rdphi1.com/tools/da.cpanel.import.tar.gz
4-make 2 directory by this command:
root@server# mkdir import export
and copy backedup files from cpanel server to import folder
5-extract tool by
tar zxf da.cpanel.import.tar.gz
6-change setting of file defaults.conf by an editor like vi as you want for example your IP and ...
7-run tool by this command
perl da.cpanel.import.pl
8-now you must check on your export folder, tool will convert cp backedup files and move hem to export directory.
9-make a reseller on DA controlpanel
10- make a directory on reseller folder by this name:user_backups and move all converted files from export folder to this directory
11- go to DA control panel as reseller and select "Manage User Backups" menu (I'M USE NOW V1.27.1 May 2006) on step1 select localfrom restore part,step 2:IP not very important and in step 3 you can see GOLDEN files yea, you can see your backup files ready to restore select them all and restore.
Finish
I convert my sites today and it convert all MYsqls-emails-and web files and user's password now I must just Tell to my user new control pane address,they used befor this change sitex.com/cpanel and today must use sitex.com:2222
I think they can't feel any change on this server movement.
but in one case my user had mailman mailing list that its not available now.
have fun
Nango
ZenSpirit
05-27-2006, 10:36 AM
Me as well would like to put up a BIG thank you to l0rdphi1 for this contribution.
Migrated a bunch of users from cpanel to DA, and everything worked like a charme, only the mailman mailinglists don't migrate, but i can live with that :)
Once again: THANK YOU!!
Greetings,
ZenSpirit.
Hi, I want to restore a backup from cPanel on my DirectAdmin Account, but it doesn work out...
First of al: how should I edit the configuration file?
ip=xxx -> this one I know
ns1=xxx -> this one I know
ns2=xxx -> this one I know
creator=admin -> what should this be?
docsroot=./data/skins/enhanced -> what should this be?
account=ON , I guess
aftp=OFF
cgi=ON
dnscontrol=ON
nemailr=unlimited -> what should this be?
nemails=unlimited -> what should this be?
package=custom , I guess
php=ON
skin=default -> what should this be?
ssh=OFF
ssl=OF
suspend_at_limit=ON
suspended=no
zoom=100
Then, when this is done, how should I do step 3?
I'm haven't got any experiences with Perl, so don't really now how to do it.
Thanks for the help...
l0rdphi1
05-31-2006, 03:32 PM
Ward,
That config file looks more or less fine. To answer your questions: creator is the reseller you want the new user to be added as. Unless your DA administrative user is not "admin" and you don't want to add the users as a different reseller, "admin" is what you want here.
docsroot is the skin the user will get. It's setup by default to use the enchanced skin. Don't need to change this.
nemailr controls the number of email responders the user can have.
nemails controls the number of pop3 accounts the user can have.
skin should probably be set equal to enchanced since it's using the enchanced skin above.After finishing your modifications to the configuration file, login to SSH and execute that Perl command. You don't need to know anything about Perl to use this tool. There will be instructions displayed on the screen to help you continue.
Cheers, Phil.
teedee
05-31-2006, 10:26 PM
Hi,
I have used this tool to sucessfully move over 35 domains so far, howerver there is one domain that it just doesn't work for.
the cpanel backup is 51.4mb (most of which is mail) and it gets converted to a 50kb DA backup file with no mail addresses or mail.
Would appreaciate any ideas, or even how to transfer the mail accounts manually as this is only one of a few domains I have left on a cpanel server now.
nobaloney
06-04-2006, 12:06 PM
Note that what I'm about to say is untested, so save a good backup file.
My suggestion would be to, after you've backed up and restored the site, delete everything on the CPanel server for the site except the email stuff.
Then backup and convert again.
Then, on the DA server, do the conversion and unpack the converted backup on the DA server and manually put everything into position.
Note that this is UNTESTED; worst case (if you keep the full backup file) is you'll have to kill and rebuild the site and you'll be back where you started from.
Jeff
getUP
06-05-2006, 06:38 AM
As posted before, we added e-mail/imap support to the original tool:
# wget http://83.98.148.16/imap_da.cpanel.import.pl
miltongoh
06-10-2006, 09:56 PM
Hi People(s)!
Do any one mind to do a review on the tool?
Any full instruction on what to do to use the tool?
*CURRENT SITUATION*
Now running.
cPanel 10.8.0 10.8.2-R119
CentOS 3.7 x86_64 - WHM X v3.1.0
Need to migrate 46 accounts in total. (of which some one is reseller acccount.)
1) Email (Email account + Email password must not change.)
2) MySQL (MySQL name should not change too.)
3) Website (FULL WEBSITE TO BE MIGRATED)
Any successful issues on the migration as all 46 accounts is very important and I wished to migrate to DA.
netstepinc
07-03-2006, 01:10 PM
I was so excited when the conversion and restor went so SMOOTHLY.
However, the email accounts from the Cpanel site didn't import.
Where should I look for a solution?
IF I set up a DA user with a different user name, can I copy the files from the restored user to the new one or will it all be FUBAR?
Andromeda
07-10-2006, 11:43 PM
Hello guys. This is my first post here. I have read through every single post in this topic and I still am at a loss. I really need someone to please give me a hand. If you can help me please do so. I have been working on this for four days.
netstepinc
08-01-2006, 09:37 PM
If this tool was officially supported and included excellent instructions at http://help.directadmin.com/ I believe DA would get many more Cpanel Refugees.
My Cpanel host is using pkgacct for backups but the accounts I've tried have not successfully converted the email accounts.....which is the main goal. I can FTP the site eaily...migrating Email/UN/PW is the most significant.
SupermanInNY
09-14-2006, 03:10 AM
Ok.. here is my scenario:
I have cPanel backups that need to be converted to DA.
While the websites, mysql etc worked fine there was a mishap with the email:
1. Forwarders disappeared.
2. Mail msgs disappeared.
So where are they?
OK:
cPanel now uses IMAP.
Sent Items and Drafts for example are stored in a DOT file
.Sent
.Drafts
Those were not converted by the utility.
On my DA machine I'm running Dovcot-MailDir whereas on the cPanel I was running courier-imap.
So,. if it is possible,. I would suggest adding another menu question:
<if you know, otherwise we'll guess> please enter the Mail software on cPanel. [courier-imap]
Please select the mail software you have on DA (Dovcot-Maildir/vmpop3) [vmpop3]
(sorry,. I don't remember the name of the service that was running before I switched to dovcot).
And then run the conversion.
I'm being hammered by my users after converting over 200 accounts and "where is our email?"
thankfully I am able to see the msgs in the Dot files, so I move them manually.
Thanks,
-Alon.
pucky
09-14-2006, 08:15 PM
Originally posted by SupermanInNY
I'm being hammered by my users after converting over 200 accounts and "where is our email?"
thankfully I am able to see the msgs in the Dot files, so I move them manually.
Thanks,
-Alon.
Well first of all, users should not be storing their important email on the server. Thats rule number one. I know i know, you can tell them that till you go blue in the face but they will not listen. They may be hammering and hounding you for answers but really, shouldnt you have informed your users that you will be making a transition?
We will definately give our users a CUTOFF DATE where they will need to retrieve all their mail, from their mailboxes, before we do the conversion. That way, nobody can scream and yell about it.
Again, mail should not be left on the server indefinately. Thats really all there is too it.
Second, thanks to the author for the conversion script. I have about 700 sites to transfer, 400 of those is owned by one reseller.
Hopefully, i will not have too many issues with converting resellers as 90% of our users are resellers.
Thank you.
IRLAMP
10-21-2006, 07:07 AM
Hello
I need help that How can I transfer the backups from DirectAdmin Control Panel to Cpanel?
is it possible?
Thanks
SupermanInNY
10-21-2006, 09:39 AM
Originally posted by IRLAMP
Hello
I need help that How can I transfer the backups from DirectAdmin Control Panel to Cpanel?
is it possible?
Thanks
Now why on earth would you like to do that??
I have cPanel boxes and DA boxes, and I'm in the process of migrating all my cPanel boxes to DA because there is almost nothing in cPanel that I don't have in DA that is useful both for me and my end users.
Give me few examples of what you need in DA that you don't currently have and we can probably find the right way to do it withou much hassle.
-Alon.
IRLAMP
10-22-2006, 05:49 AM
Thanks for your reply
I don't have any problem but the control Panel that is used on the new server is Cpanel And I have to transfer my accounts there.
Thanks
aingaran
10-31-2006, 05:05 PM
Sorry to be so ignorant, but is this post initial transfer? Or does this replace (ie the NEW) initial transfer?
Originally posted by getUP
Seems to be going fine now.
My latest version with IMAP support:
# wget http://www.l0rdphi1.com/tools/da.cpanel.import.tar.gz
# wget http://83.98.148.16/imap_da.cpanel.import.pl
# tar zxf da.cpanel.import.tar.gz
# mkdir import export
# chmod +x imap_da.cpanel.import.pl
Customize defaults.conf
# ./imap_da.cpanel.import.pl
And follow on-screen instructions.
sgwebcity
11-03-2006, 10:40 AM
could anybody do me a favour and help me convert my cpanel backup to a dadmin one.
SupermanInNY
11-03-2006, 06:37 PM
Originally posted by sgwebcity
could anybody do me a favour and help me convert my cpanel backup to a dadmin one.
Use the Force.....
Have you tried to follow any of the steps and tools provided?
I won't lecture you about the added values and how important it is that you understand how to do it yourself,.. but, you need to do at least the few steps and when you hit a wall, then ask questions that we can walk you through 'mysterious' processes.
Start by d/l the utility and setting the directories as instructed by the author.
then, ask your question so we can help you specifically.
Inquisitor
11-24-2006, 01:39 PM
Hi guys, I'm a cPanel refugee-to-be (I hope!), now that I've found this tool - thanks for writing it, l0rdphi1!
However, there's one problem, as I need IMAP emails converted, and this link:
Originally posted by getUP
http://83.98.148.16/imap_da.cpanel.import.pl...now appears to be dead. :( Does anyone know if it was superseded/built in to the main script, or if a copy is available elsewhere? I hope DA makes this an official feature in future, because I'm sure they'd get more cPanel refugees if accounts/settings could be easily imported from the admin panel.
Thanks for any help. :)
gate2vn
11-28-2006, 03:01 AM
I am trying to convert a big account from cpanel to da. the backup file size is around 900MB. It contains emails only. But after converting, only the pop3 accounts were converted, without any email messages.
is there any way to keep the email messages?
thanks,
Inquisitor
11-30-2006, 12:55 AM
Originally posted by gate2vn
I am trying to convert a big account from cpanel to da. the backup file size is around 900MB. It contains emails only. But after converting, only the pop3 accounts were converted, without any email messages.
is there any way to keep the email messages?
thanks, I had the same problem when testing the tool on my cPanel sever (10.9.0-RELEASE 57) - I don't have access to a DA installation yet. I'm assuming something about the backup format has changed subtly since the current release of the tool was last tested.
I think I've found the problem and a solution, from what I understand of Perl/shell scripting and the DA backup format. However, since I can't test it with DA, it's not guaranteed to be correct.
In the latest version of da.cpanel.import.pl, find:
my $cP_mbox_domain_bit = $domain eq $cp_user{DNS} ? '' : "/$domain";and replace with:
my $cP_mbox_domain_bit = $domain eq $cp_user{DNS} ? "/$cp_user{DNS}" : "/$domain";Hope that helps. :)
gate2vn
11-30-2006, 11:10 AM
I think the reason is recent version of cPanel has switched to imap. but this tool is converting pop3 only, not imap
So, only the accounts can be converted. I have to move messages manually. However, now, everytime going to Squirrelmail, it says
"ERROR: Connection dropped by IMAP server.
Query: FETCH 1:* (FLAGS UID RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Importance Priority Content-Type)])"
is there any idea to fix?
thanks,
Inquisitor
11-30-2006, 01:05 PM
I have no idea how to fix that, sorry. :( Maybe l0rdphi1 (the tool's author) or getUP (who created the IMAP add-on to the script, the link to which is now dead) can help... If I knew more about cPanel's parasitical nature, I'd see what I could do myself. :\
nango
12-27-2006, 05:46 AM
Hi
I need to do this tools or something like this for Transferring from DA to Cpanel Please help me, and please don't ask about reason
;)
justahost
01-07-2007, 11:14 AM
Hey all,
Did anyone manage to get that file: http://83.98.148.16/imap_da.cpanel.import.pl
If so if you email it me I can host it for a while. I need it as well to get some accounts to DA :)
Ry
Terrorhawk
01-29-2007, 07:18 AM
Hi i'm new here.
My old server was using CP with mysql 5.?.? with the new password format.
my new server is with DA and i updated mysql to the version using the manuel in the FAQ.
but now i want to restore a CP backup on the DA server using this script and it looks like almost everything is working only the mysql part.
An error occurred during the restore. Today at 13:14
Unable to restore database djwizard_agbook1.sql to djwizard_agbook1 : ERROR 1045 (28000): Access denied for user 'djwizard'@'localhost' (using password: NO)
Unable to restore database djwizard_wizard.sql to djwizard_wizard : ERROR 1045 (28000): Access denied for user 'djwizard'@'localhost' (using password: NO)
Database '' doesn't belong to you.
can someone help me?
i think this is becouse the different mysql in passwords.
if there a way up check or update mysql on DA to use the new password ?
I found something.
i have created a test user (named dynamike) and add a database with the user dynamike_home
if i create a backup now i see a file dynamike_home.conf with the user pref in it for the sql
if u check the tarbal created by this script i see the sql databases but no .conf file with the sql user pref.
drazhar
02-05-2007, 10:05 AM
Firstly: Lordph1l, you de man dawg :)
Secondly: the converter does not seem to take account of any files/directories in the root of a users home directory (/home/user/).
Under normal circumstances i accept that a user shouldnt place files there, but how many normal users are there?
rickzone
02-13-2007, 12:49 PM
Hi
Total newbies to server world when comes to using "wget" etc i am good in learning thing so want to try it before i tell my current host to do it for me.
1. First where do i type all this command line listed by author? wget etc.
2. On my current cpnael account i have a main website account and than several sub domain account. So Would the script convert everything?
SupermanInNY
02-13-2007, 07:12 PM
Hi
Total newbies to server world when comes to using "wget" etc i am good in learning thing so want to try it before i tell my current host to do it for me.
1. First where do i type all this command line listed by author? wget etc.
2. On my current cpnael account i have a main website account and than several sub domain account. So Would the script convert everything?
Using SSH2 (AKA SSH).
You need to d/l a program like putty (putty.exe) that will open a Shell window (like an old DOS) window and then you can login to the server and issue such commands.
AndyII
02-22-2007, 09:02 PM
this is a good thing, but would also be good to have a windows based app to do conversion of already downloaded sites, any such animal?
can this be run from a pc?
hi
i got error while
Copying remaining files...
Creating domain pointers...
Translating any Crontab entries... 0 total..
Dumping databases...
Creating DirectAdmin tarball...
Cleaning up...
Success!
1 tarballs attempted/converted.
Transfer process running...
ssh: y: Name or service not known
lost connection
~fin.
SotaServers
03-26-2007, 07:35 AM
hello
im trying to move cpanel accounts to DA and i done everything that has been said and i get this error
Examining backup-sota-gaming.com-10-24-2006.tar.gz...
Fround user backup-sota-gaming.com-10-24-2006..mv: cannot stat `./import
/backup-sota-gaming.com-10-24-2006': No such file or directory
.
Copying remaining files... mv: cannot stat `./import/backup-sota-gaming.
com-10-24-2006/homedir/public_html': No such file or directory
Creating domain pointers...
Translating any Crontab entries... 0 total..
Dumping databases...
Creating DirectAdmin tarball...
Cleaning up...
Success!
1 tarballs attempted/converted.
~fin.
any one got any ideas?
i need help asap i have msn cobra@sotahosting.co.uk
Thanks
Chris
Hey all,
Did anyone manage to get that file: http://83.98.148.16/imap_da.cpanel.import.pl
If so if you email it me I can host it for a while. I need it as well to get some accounts to DA :)
Ry
I want this script too. Anyone? please. :(
hostpc.com
03-31-2007, 02:45 PM
http://www.hostpc.com/da.cpanel.import.txt
This is the last known working copy of this script. Copy and rename to da.cpanel.import.pl
Joe
Thank you hostpc.com. :D
But i need "imap_da.cpanel.import.pl" script to import imap email from cPanel to directadmin. Do you have this file?
n9net
04-13-2007, 11:43 PM
Please post link to script to import IMAP from cPanel to DirectAdmin.
l0rdphi1
04-26-2007, 12:43 PM
Unfortunately, I don't have a copy of this script with IMAP support. However, I did have a quick once-over of a cPanel backup, but didn't see any reference to IMAP. If you guys have a copy of a backup that has IMAP data, I could look at adding support for it--I doubt it would be very difficult.
Cheers!
smtalk
04-26-2007, 12:45 PM
l0rdphi, I don't use your tool, but I can help you. You just need a cPanel server with Maildir I guess or a user backup. Contact me on MSN, ICQ or Skype and I'll give you details.
l0rdphi1
04-26-2007, 01:07 PM
l0rdphi, I don't use your tool, but I can help you. You just need a cPanel server with Maildir I guess or a user backup. Contact me on MSN, ICQ or Skype and I'll give you details.
Thank you for the offer, however I think I've found the Maildir data in my backup. It should be inside the directory /homedir/mail/DOMAIN/USER/. I'll see what I can do with that soon.
Phil.
SupermanInNY
04-26-2007, 02:49 PM
Thank you for the offer, however I think I've found the Maildir data in my backup. It should be inside the directory /homedir/mail/DOMAIN/USER/. I'll see what I can do with that soon.
Phil.
You have about 50 DA Admins waiting eagerly :)).
I can set up a test cPanel VPS (they give 15 trial licenses) for you to run tests on it if that helps in any way (My cPanel license expired in Feb, - wasn't in use for 4 months as I converted to DA and had to manually move the Maildir-Courier files from the old box to the new box).
Let me know if you want me to set up the VPS.
-Alon.
l0rdphi1
04-27-2007, 03:13 AM
You have about 50 DA Admins waiting eagerly :)).
I can set up a test cPanel VPS (they give 15 trial licenses) for you to run tests on it if that helps in any way (My cPanel license expired in Feb, - wasn't in use for 4 months as I converted to DA and had to manually move the Maildir-Courier files from the old box to the new box).
Let me know if you want me to set up the VPS.
-Alon.
I should be able to get this working without the VPS. Thank you for the offer though. :)
I compared a DA and CP backup last night and it seems there are some major differences between how each stores Maildir data. I need to have a better look at it though. I'll try to do that soon. :)
Cheers!
- Phil
l0rdphi1
04-27-2007, 01:51 PM
I had a better look:
It appears CP has a directory for each IMAP folder, and then a separate file for each mail entry in the proper directory.
However, DA uses one file for each IMAP folder, and all mail entries are separated by a double line break in the proper file.
That's what I gathered anyway. If someone with more expierence--perhaps someone who converted IMAP data manually--could confirm, I'll have a go at adding this conversion to the script.
Cheers, Phil.
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.