Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

Question for a WHM/Cpanel whizz...

Joined
Apr 5, 2005
Posts
9,805
Reaction score
1,335
If I do a full backup of a website through Cpanel, does that really back up everything? In other words, will it back up mailboxes, usernames and passwords, MySQL databases and database users, cgi-scripts, directory permissions and passwords, etc. alongside the content of the "visible" site under public-html?

And does that mean that a hosting company should be able to simply restore a full Cpanel backup if I want to transfer a database-driven site from one hosting service to another and have everything work just as it did before?

Thanks in advance for any light you can shed on this!
 
Yep it does, dead easy. The exclude feature is also useful if you have a large directory like downloads or cache as that is quicker to ftp over or if you mail directory is huge exclude that and ftp it instead
 
Ok, thanks for confirming that. That's really reassuring, as the script that runs the database is very elderly and hasn't been touched for nearly 10 years, so I was loathe to try and tinker with stuff I don't even half-remember...
 
Best to save a copy of your entire database just incase

mysqldump -u root -p --all-databases > alldb.sql

If you have any issues you can drop that back in on another server and as its 10+ years old make sure the new servers mysql / php still works with your old code. If so you will need to fix your code or force cpanel to install an older mysql version (which I think can only be done from a format and new cpanel install)
 
Goodness, I'm not sure I'll be able to do that with my new hosting arrangement since I won't have root access. But I guess the support team will.
 
Yes Edwin that's right. In fact, with most hosts they will do the migration for you. Simply give them the cpanel login details and ask them to restore the site to your hosting account with them. With 20i hosting theres actually a migration panel where you can conduct your own migrations with a few clicks by simply entering your old hosting whm or cpanel login details, genius. I did 90 sites like this recently.
 
Why give yourself the job of uploading and downloading when the host will take the strain and do it for you.
 
I'll see if they offer that. Thanks for the suggestion.
 
Has anyone seen this sort of problem?

I have some database-driven directory scripts that sit inside cgi-bin on various sites.

I moved them to the new hosting package by doing a "Home Directory" backup and a "MySQL backup" then restoring them on the new hosting space.

This worked for at least a dozen sites without a glitch, and the whole thing took 15 minutes per site tops.

However, there are two sites that only give "500 Internal Server Error" when I try and evoke the admin script inside cgi-bin on the new web host.

Here's where the mystery gets really weird:
A) I am copying them in exactly the same way for every site
B) All the scripts definitely work 100% on the old server
C) The directory script is identical to the working ones for one of the two sites, and only very slightly different for the other (the differences shouldn't explain it not running at all)
D) It doesn't seem to be down to scripting errors because nothing even shows in the Error Log i.e. the script's not even trying to run
E) It doesn't seem to be permissions, because I looked in File Manager, and also asked the new hosting company to compare the permissions on a working script and a broken script, and they were identical. Owners/groups were also correctly matched to each hosting account.

Unfortunately, the new hosting company doesn't offer detailed support for third party scripts (which is probably fair enough at just $50/month for quite a meaty package) which means I'm scrabbling around trying to find an answer.

Most likely the above is too vague to be of use, but I've got my fingers crossed in case anyone who knows this stuff reads it and has a lightbulb moment!
 
Your provider needs to look at the server log (not site log) files. It could be different versions of php with deprecated/obsolete commands. It could be dependencies needed not installed in new place. Error 500 usually points to permissions but you say it's not that - however the http users may be different server to server - some apache some www-data etc. The log files on the server will give exactly the problem - sometimes in /var/log/httpd/httpd.log - can check the bind log files, messages, panic logs etc as well. Could be a badly formed (or different) entry in the httpd.conf file - there are lots of potential reasons.
 
Ok, I'll try and do some digging along those lines.

The weird thing is that I can delete and recreate the sites in WHM, and only those two break every time. Anyway, thanks for suggesting places to start looking.
 
Have you got the database name right? Sometimes it's as simple as a connection error
 
Yes. But the database doesn't even need to be running for the script to do "something". The back-end admin panel will work fine without a database, because it has a section for the SQL configuration to be entered after logging in.

Meanwhile I managed to get another 2 quasi-identical sites copied across and working - it's more and more of a mystery where there are just a couple that aren't cooperating.
 
Well, I got one of the 2 working (the supposedly identical one) by reinstalling the script from scratch on the new web host with a test database, then changing the settings to use the old database containing the actual data, then applying the 20-odd template customisations again one by one from the old site. Not a brilliant way to do it, but the net result is that it works.

So now I'm down to one tricky one!
 
It's all good now. Reinstalling the last site was about as fun as a root canal (trying to figure out exactly what I'd changed 12 years ago, and how, was a barrel of laughs) but after 5 hours of fiddling, it's finally working as it should.

Thank you to everyone who chipped in with advice!
 

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Register for the auction

Latest Comments

Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom