Mark C Baldwin
menu
Mark C Baldwin
Tech

HOW TO: Amazon s3 Backup Solution for Cpanel

whm-backups

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.

whm backups
Here are some of the settings I used:
  1. Backup status: enable.
  2. Backup Type: compressed.
  3. Backup Daily: Yes
  4. Retain 5 Daily Backups
  5. Backup Accounts: Yes
  6. Backup Access Logs: Disable
  7. Use Local DNS: Disable
  8. Backup System Files: YES
  9. Backup Databases: Per Account Only
  10. Backup Directory: /backup
  11. Retain Backups in default backup directory: Yes
  12. Mount Drive as Needed: Disable
  13. Additional Destinations Amazon s3: Create New destination

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.

amazon-s3-bucket

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. amazon-security-credentials 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.

Mark Baldwin
written by: Mark Baldwin
Mark Baldwin is the Digital Services Manager at Valpak in St. Petersburg, FL. He received his Bachelor of Science degree in Internet Marketing from Full Sail University and holds certifications in Google AdWords and Google Analytics. He’s an award winning web designer who started coding in 1999 and is passionate about all things tech and digital. Mark works on the digital product team managing the development of our advertiser reporting platform, Website Design, SEM, SEO and Social Media Services.

13 Comments

Leave a Comment