Migrating from Plesk to cPanel via commandline

Rob —  June 19, 2013 — 1 Comment

If you’re anything like me, you prefer to do things via command line (CLI) rather than relying on a GUI to do most things in Linux. You also realize that while some of us don’t like to use control panels (plesk, cpanel, webmin, etc..), they are necessary when providing a shared hosting environment for your clients.


While cPanel has an excellent migration utility (and they’ll even migrate it for you for free in most cases), it will sometimes fail for one reason or another. If you do it via command line, you’ll be able to cut out some of those failures.

Here are the steps to migrate a customer from a plesk 8.x (yeah, pretty dated) box to a cpanel 11.3x box.

Info about our transfer:

  • Source server: plesk.company.com
  • Source account owner: siteuser
  • Destination server: cpanel.company.com

Source server (plesk)
1. SSH into the source server and become root
2. To find out the account owner, just see who owns the files in their /home/sites/domain.com directory.
3. cd into the home directory and run the pkgacct command calling the username that owns the account you want to xfer.

4. When that completes without error, move the file to the destination server using scp

Destination server (cpanel)
1. SSH into the destination server and become root
2. cd into /home and run the restorepkg command calling that same username to create the user and complete the migration

After this runs, you’ll see that everything for that user has now transferred over!

Things that are handy to know:
1. If the user’s account is huge, and perhaps there’s not enough room on the server, you can run the pkgacct command with –skiphomedir flag:

Things to check:

  1. Database names may now have different names on the cpanel server depending on your configuration. Instead of ‘databasename’ it may now be ‘siteuser_databasename’ or something similar.
  2. Run through the site – make sure all of the client’s pages come up how they’re supposed to – there may have been some special settings in the plesk php.ini or other configuration file that you’ll have to now do on the destination/cpanel server.

You’ll also feel better about yourself because you did it via command line, saved some time.. and can get on with something else now.

Related posts from Linux Brigade!

  • Migrate mail from one server to another with imapsyncMigrate mail from one server to another with imapsync Have you been in the situation where you needed to move everyone’s mail from one provider to another?  It’s a pain to do using the mail client one at a time, but with this guide, you’ll be […]
  • Manually run ClamAV on cPanel and check every userManually run ClamAV on cPanel and check every user If you’re running WHM/cpanel and want to run a scan on every user manually, perhaps when first installing ClamAV, you’ll want to run this command which is endorsed by cPanel […]
  • Search previous commands typedSearch previous commands typed If you want to see a collection of your previous commands used in Linux, you can always type ‘history’ for a listing of them. You can even search through history by grepping for the […]
  • cPanel / CSF: Fix 500 internal server error or 404 for the CSF GUIcPanel / CSF: Fix 500 internal server error or 404 for the CSF GUI I’ve run into this a couple times – where I’ll spin up a CentOS/cPanel machine, then run a cpupdate (/scripts/upcp) to get cpanel up to date.  I’ll then go into the configserver firewall […]
  • Block Countries using mod_geoip in cPanelBlock Countries using mod_geoip in cPanel Yesterday, I wrote an article on how to block certain countries from your server using csf. This will block them from accessing your server on any port. You can, however use mod_geoip if […]

Trackbacks and Pingbacks:

  1. Migrating from Plesk to cPanel via commandline | Webmaster Brigade - June 19, 2013

    […] We’ve moved this post to our Linux Blog:  http://www.linuxbrigade.com/migrating-from-plesk-to-cpanel-via-commandline/ […]

Leave a Reply

*

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">