Creating Automatic Backups on a GoDaddy VPS

VPS vs. Shared Hosting

Shared Hosting on GoDaddy is usually a great level of functionality for my clients, even those with larger sites and custom programming. With Shared Hosting, you share an environment with other sites that other people own, so you can’t make major changes to PHP and MySQL settings, and that’s usually just fine, because I’d rather not mess with those details anyway.

However, sometimes in my work for clients I’ve come across requirements that mean I need to upgrade their hosting from a shared hosting plan to a VPS, or Virtual Private Server. This is usually because either the PHP or MySQL settings on Shared hosting won’t let me do something I need to do to complete their project (Max file sizes, max timeouts, and minimum characters in a MYSQL search come to mind).

This sucks.

The two main reasons I choose GoDaddy for my clients is their awesome Customer Service, and I know their site tools (cPanel) really well. But when you switch from their shared hosting to a VPS, you lose both of those awesome things…sort of.

You can still call up and get a helpful GoDaddy-person on the phone, but there are many things they just can’t–and won’t–help you with on a VPS. A VPS is meant for a user that makes changes at the server level. Think of it like a webhosting Super-User. If you are not a Sysadmin, and aren’t very comfortable with making MySQL configuration changes in SSH, it’s a scary world to find yourself in.

You can also still use cPanel, but now you need to get there through your server page, and you have to set it up yourself just to HAVE cPanel (if you’re not migrating an existing cPanel site). You’ll also need to get familiar with WHM, the server management version of cPanel. It is…robust, to say the least.

This is the menu with every section CLOSED.

One of the MOST frustrating things about the VPS is the lack of knowledge about it on the internet. Either the page you are linked to from Google is defunct, or the content is, so you get frustrated trying to get to the correct answer.

VPS Backups Hostname

My most recent frustration was setting up the paid-for Backups on a Client’s newly upgraded VPS account.

It seemed simple enough. You click on Manage Backups on your Server main page, choose + Website, and enter your info.

Three steps to get to Create a New Backup

But what was the Hostname I should use? That should be an easy answer to find, right? Is it the domain of the site I’m backing up? The address GoDaddy uses for the site (“/home/yoursitename/”)? No, these don’t work, so maybe it’s the value for HOSTNAME that shows up on the Settings button on the Server main page?

It specifically says what the Hostname value is right here…right?

Nope!

Frustrated yet?

Do you want the dang answer already?

It’s the IP ADDRESS. Yeah, seems dumb I didn’t try that before, right? But I was stupidly using their documentation to try to get the answer, so I guess that’s my fault. Oy.

Other Configuration Considerations

So you have the Hostname (IP address), your DB name and username and password (you can find the first two in the cPanel, and the Password you better know where to find…). You click Next, and you get this error: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

Awesome.

So you read the top of the Add a DB page:

Connection Details

Note: Our external IP addresses for backups is 52.8.234.204, 52.8.48.18, 52.8.41.70, 52.8.12.161. You may have to update your firewall settings if you are unable to connect.

…and realize you need to whitelist the IPs they give you, so your Database will allow that connection. Now how do you do that? Sure would be nice if they just linked it for you, or gave you the link to instructions there, but nooooooooooooooooo.

It’s Remote MySQL, under Databases, in your cPanel.

How you get to Remote MySQL to whitelist IP Addresses

Add those 4 IPs there (for me they were 52.8.234.204, 52.8.48.18, 52.8.41.70, 52.8.12.161, but yours may be different).

Add the IP addresses here. You don’t need wildcard or other characters, just the IP address will do.

Hopefully that should get your site and Database backed up, and keep you from seriously considering thinking about maybe investigating other website hosts before your next project.

Leave a Reply

Your email address will not be published. Required fields are marked *