I just got done telling my Fiance’ how excited I am for my new cPanel/Amazon backup configuration. Imagine hosting multiple sites and not having a reliable backup? Well I can tell you that I have been burned by faulty backups with my past web host. Lets just say this site (markcbaldwin.com) was full of content. That is, until my shared hosting disappeared and landed somewhere in the bit bucket. When you have multiple sites, you need a professional web hosting solution. While I’ve used cPanel in the past, I never really wanted to make the jump because it increased costs significantly. Today I only pay $20 per month for full blown VPS with cPanel and WHM which is much cheaper than what I would have paid in the past.
This year cPanel came out with the option for users to back up each cPanel account in WHM to Amazons cost-efficient S3 cloud hosting. What I like about the ability to back up to Amazon S3 is that they make it very easy. For one its automatic and two its practically free. In addition to backing up to Amazon you have the ability to back up locally to your server. I have a virtual private server so I have local backups in addition to to my remote backups. That way if something is corrupted or something goes wrong, I have backups in multiple locations. Local backups are good because you can restore a local backup faster. Remote backups are good because in the event your server or data center fails, you can restore your remote backups to any cPanel/WHM setup. Below I go through how to set up remote backups Amazon S3 first you need to login to WHM. Once you’re logged in, in the left-hand column you’ll see backup and back up configuration.
If you haven’t done so already sign up for a free Amazon S3 account. They will ask for a credit card but I don’t think i’ll be charged because 1 backup consists of 250MB. I don’t see myself with 5 backups going over the free 5GB limit. It depends on the site of your website but even still I think the fee per G/B is miniscule. Once you have signed up and have accessed your s3 account, you will want to create a bucket. Buckets are essentially file folders that will hold your backups.
Next you will need to create an access key and secret key. You can do so in your s3 account by clicking your account name in the top right, a drop down will appear and you will see security credentials. Click security credentials as illustrated in the image below then click Access Keys (Access Key ID and Secret Access Key) to create you access key. Once you have created your security keys, go back to the backup section of WHM and enter the bucket name, access key, and security key. Validate, if all is good, then you should be good to go. Click save and your remote backs are now set up. It took my about 20 minutes to set up the first time so you should be up in running in no time! Feel free to ask any questions in the comments section. In the end, I now have peace of mind knowing my websites are backed up. Also, if i decide to take my business elsewhere all I have to do is provide my new host with the backups and a simple restore process will have EVERYTHING identically setup like it was with my old host. Man… I love technology! Update: After validating my bucket name, access key, and security key I was unsure that backups were actually set up. It couldn’t be that easy. I logged in to my Amazon s3 account today and sure enough, they were there! All broken out by account. I am thoroughly impressed by the job cPanel has done with this setup making it easy to store cPanel backups remotely.
13 Comments
Tech RankerAugust 14, 2014
Very helpful, thanks. I also created a folder in my bucket called “backup”.
Mark BaldwinAugust 14, 2014
Nice! Good call. It actually came in handy a couple months back as my wordpress installations were compromised. The host shut down my VPS and would have never been able to receive those files had I not set up this offsite backup.
TomAugust 14, 2014
Is there any way to restore the backup directly from S3 “without” downloading it and then uploading via FTP?
Regards
Mark BaldwinAugust 14, 2014
From my experience I don’t think there is a way. From cPanel you have options to select your backup and upload your backup so you can restore.
TomAugust 14, 2014
Thank you…
Patrick CoombeAugust 14, 2014
Tom – there isn’t a straightforward setting for this, but if you are really trying to save local bandwidth you can make it happen. Restore the files to one of Amazon’s hosting services then to a copy via ssh or even FTP.
Samuel DeeringAugust 14, 2014
Thanks Mark.
Mark BaldwinAugust 14, 2014
No problem!
Mike HeffleyAugust 14, 2014
Hi Mark –
Thanks for the great step by step on this. I was researching how to set this up and your article cut down the learning curve and upped my confidence level dramatically! So much better than manually creating and downloading locally.
Mike
Mark BaldwinAugust 14, 2014
Great! I’m glad it helped.
gregAugust 14, 2014
I trying to get Amazon s3 to validate. I have created a bucket, pasted access keys, etc. Bit I get this error message when I try to validate: “Error: Validation for transport “mybucket” failed: Could not upload test file: AccessDenied: Access Denied” Any suggestions?
Mark BaldwinAugust 14, 2014
I am not able to help you troubleshoot your setup but it sounds like a permissions issue. I would recommend starting over from scratch or going back through the process again. Play around with it and you’ll get it eventually.
PhillipAugust 14, 2014
I had similar problems. Mine was due to fact that are, apparently, two types of Access Key / Secret Keys. The type you need is a root level key created, as Mark points out thankfully (!), under “Accounts”.
I created a IAM Access Key and encountered the problem you have described.