What got me up early Saturday and then up at 1am on Sunday? Server hardware failure…which led to some database corruption. I have never had to deal with database corruption, so I did not even know my problem was database corruption until after calling the helpful tech guys at Liquid Web. (I am not one to usually call tech support, but at 136am on a Sunday…I did not feel like spending time at mysql.com or google.com.)
I first noticed something on Saturday morning, but after restoring a database table from a backup, everything was golden. I told myself…it had to have been from some user error. Monday morning, after my Nagios server paged me, I noticed that jappler.com had several mysql
fetch_row () errors after the server came back up. I decided that this problem was not user error and something else was going on. As soon as I told the tech guy the error that I was seeing onjappler.com and other web sites I manage, he asked me if I had tried “repairing” the databases. I had not even thought about it (especially so early in the morning). Once he “repaired the databases”, everything was perfect.
This was a stressful lesson to learn, but I am always happy to learn new things. The lesson I learned was about database corruption. (All my tables are MyISAM)
- What is database corruption? Database corruption is damage to a database that then affects the integrity of the database structure and/or data.
- How/when is database corruption likely to occur?
- How do you repair your MySQL databases via the command line?
- How do you repair via CPANEL?
[tags]MySQL, database corruption, CPANEL, MyISAM[/tags]
Well, after multiple outages in the last few weeks, I think it is once again, time to move to another host. I had high hopes for Host Gator but I cannot handle too many more conversations with the tech support people because of outages. Next up: another go at a VPS account at Liquid Web. The conversion begins tonight.
[tags]web hosts, jappler.com, Host Gator, Liquid Web[/tags]
For months I have been manually backing up my web sites. Last night, I learned my lesson and realized I needed to have something more dependable in place. (and I am pretty damn dependable). I finally took the time to research the process of automating a CPanel update.
The script I found and used is freely available and easy to use.
How to completely automate your CPanel backup and store the files remotely:
There are three main parts to this process:
- The backup script.
- Download the script.
- Edit the script’s configuration variables as needed (see instructions on the download script page (see above).
- Set up a cron job via CPanel (cron jobs is one of the main icons in the list) so your script will run every x minutes/hours/days/weeks/months.
- The files you want backed up on your host. The script will have CPanel perform a full backup of all your files and databases. (The same if you were to choose “full backup” within the Backup module of CPanel.)
- The location where your files go when they are automatically backed up.
- Define the server/computer you want your files to get backed up to. If you are like me and do not have a static IP address for the computer you want all your backups to go to (my home computer), you will need to set up Dynamic DNS. (See my HOWTO access your home computers from anywhere post.)
- Set up FTP access to your server/computer (in my case my home computer) so the script can grab the backup and transfer it to your server/computer.
That is all you will need to do. You will be emailed every time this process runs so you will always know when your last backup was/if it was successful. Depending on how many active changes you are making to your web site, you will want to adjust the frequency of the backup. For a web site like this, I will back it up every 7 days. Why five? When thinking about backup strategies, I always think: how many days of work can I afford to lose? Figuring I have a new post every weekday, I can live with a week’s work lost. If I do a code change, a WP update, or a massive posting that I do not want to lose, I will do a manual backup to supplement my backups.
Another recommendation…always keep the latest copy of the backup on the server (your web host) as well as on your home server/computer. This way, you are ok if something were to happen to your home machine or your web host. (I like to have archived copies always available)
Ken often asks me: “what is the first thing you would do if you won the lottery?”. The last time he asked I told him I would take a cab to a Land Rover dealer and buy myself a Range Rover. I would like to continue my response to add that I would then drive home and go to apple.com and buy three Xserves. Two for web servers (one main, one failover) and the other Xserve as a development server or backup server (or game server). I would drive my new Range Rover with the Xserves in the back to a data center and then strip off Mac OS X Server, put Mac OS X client on them, call all my friends and tell them I will host whatever they want for free, and then of course talk to my financial advisor. So my point to all of this? I hate 99% of web hosts out there. I have been through several. I am tired, so I will not go into detail, but ServInt sucks. Unreliable, unreliable, unreliable. They claim they “manage” VPS systems, but it is far from managed. Both Ken and I had major problems, and the support was very unhelpful as well. Bullshit responses, slow repsonses, or no responses at all. Stay away from ServInt! Where am I now? Back with the most reliable host I have had to date…Host Gator.
[tags]web hosts, jappler.com, Host Gator, Xserve, Ken, Range Rover[/tags]
Jappler.com will be moving to a new host ASAP. I have been moving hosts for awhile now…and thought I had a good one: hostgator.com. After some downtime and idiotic conversation with the “support”, I decided I deserved better and needed to be able to take more responsiblity for my web presence. I decided to go, upon recommendation from Ken, to ServInt (the people that fark.com use)
[tags]web hosts, jappler.com, ServInt[/tags]
I had been wanting to move my personal web site on a server that supported both PHP and MySQL for awhile since I started working with the two technologies. After talking to a friend about it, he suggested I find a host and do month to month billing until I am satisfied with the hosting company. My first stop on the hosting journey: TowerHost. TowerHost had great prices and good plans, but horrible support. Ex. They offered IMAP mail, yet do a search in their support section for IMAP, nothing. I filled out a support form, and it took over a week to get back to me. I need customer service. Zip files, move on. Next stop: AMX Host. While their web site is a bit shady…hardly any content, the support contact is often avaialable on IM and the plans/prices seemed again, right on. Things were going ok for the first few months then the servers got hacked, a CPanel vulnerability, and do you think I got notified other than going to my web site only to see a hacked index.html page? No. AMX offered little explanation and did not email any of their customers to let them know the servers had been hacked. Sorry, that is not acceptable. Zip files and move on. Third time is a charm right? Time to spend some money and go to a hosting company that has a 24/7 support phone number. So, this host will be the last post on the old server until I move the files and databases to host number three: Host Gator. If you know me personally, you know I manage web servers/sites for a living, so this is exremely frustrating for me. If only I had a little more money, I would get 2 Xserves (running OS X client of course), throw them into a Verio Data Center and support myself. Someday.
[tags]web hosts, AMX, Tower Host, Verio, Host Gator[/tags]