Configuring Amazon S3 via WHM/cPanel

Posted on by Joel Parks | Updated:
Reading Time: 5 minutes

What is Amazon S3?

Amazon S3 stands for Simple Storage Service and is the cloud platform provided by Amazon for easily storing and downloading files. WHM can sync with this service to store your backups on a totally separate network.

As almost every computer user knows, anytime you add or remove crucial data from your computer you should take a backup, just in case something unexpected occurs which may destroy this information. This could be as simple as an accidental deletion or as serious as a hard drive failure. Your server is no different. There should always be some form of backup in place for these “just in case” type situations.

It's even more crucial when your livelihood or income is dependent on this data and your site. It is advised to not only keep "on server backups" but also to retain backups somewhere off the server in case of hardware failure or a catastrophic event. We offer multiple, cost-efficient solutions for retaining off server backups including Cloud Backups and Cloud Block Storage. Today we'll explain how to set up your server to push your WHM backups to Amazon's S3 service as an additional destination for your external backup plan.

Amazon S3 terminology

Buckets
Buckets are essentially containers for the objects you have stored in Amazon S3. Every object is a file contained in a bucket. For example, if the object named hashtag.jpg is stored in the "workwebsite" bucket, then it is addressable using the URL: http://workwebsite.s3.amazonaws.com/hashtag.jpg

Buckets are used for multiple reasons with several purposes: they organize the Amazon S3 content, they identify the account responsible for the stored data, and they also are a part of access control used for the data.

You can configure buckets so that they are created in a specific region or location where Amazon stores its data. This allows you to access your data closer to your location. You'll be able to configure buckets so that every time an object is added to it, a unique version ID is also assigned.

Objects
Objects are essentially files that are stored in Amazon S3. Objects consist of the core object data and also it’s metadata. The data portion is unseen by Amazon S3. The metadata is a set of information that describes the data contained in the data portion. This includes information that describes the object such as the date last modified,  and standard HTTP metadata like descriptions of the Content-Type. You can edit custom information for metadata when you store the object as well. An object is uniquely identified within its bucket by the key name and the version ID.

Keys
A key, as its name implies, is the unique identifier for an object within a bucket. Think of this like a barcode. Every object in your bucket has only one key. Because the combination of a bucket, key, and the version ID (if used) uniquely identifies each object, you can access this information within your browser by using the bucket + key + version in the URL. Every object in Amazon S3 can be uniquely addressed through the combination of the bucket name the AWS site, key, and optionally, a version. For example, http://joelparks.s3.amazonaws.com/2018-12-19/AmazonS3.wsdl

"joelparks" is the name of the bucket followed by the Amazon site URL and folder name or location of the key: "2018-12-19/AmazonS3.wsdl".

Prerequisites for Storing Files at S3

To store files in Amazon's S3 service you must first create a bucket.

To store data within Amazon's S3 service, you will need to create an account. Amazon also recommends creating an alternate user on your server for accessing their service rather than using the root or default user. Once you have an account, you will need to create and name your bucket. You can use Amazons guide to creating buckets if you are unsure how. This, however, is fairly simple. After logging in you need to go to Services in the upper left of the title bar and click on S3 within the storage section. Here you will find your buckets if they exist and also a large blue button to create a new bucket.

After creating your bucket, you will then need to locate the keys used for accessing the bucket via your server.

After creating your bucket, you will then need to locate the keys used for accessing the bucket via your server. You can find this within S3 by clicking on your username in the upper right corner followed by “My Security Credentials”. Use the drop down menu for Access Keys (access key ID and secret access key show below).

Here you will find a big blue button that says “Create New Access Key”. After generating this you should now have a user, bucket, access key and secret access key. You will need these items for WHM to push backups to your Amazon S3 account.

Configuring S3 within WHM

To configure your backups login to WHM and access Backup Configuration >> Additional Destinations.

To configure your backups, login to WHM and access Backup Configuration >> Additional Destinations. Select Amazon S3 and click “Create new destination”.

Fill in the Destination Name (this can be whatever you want to name this) followed by bucket, access key ID and secret access key using the details you gathered when creating your bucket and keys. Complete this by clicking on Save Destination.

Setup Backup Cycle and Verify S3 Destination

A "success" message will appear when S3 is configured correctly.

First, you will want to ensure that backups are enabled and that you've selected your users within the select users section. Once enabled you will want to validate that the input information is correct by going back to the additional destinations section and finding the newly created Amazon S3 destination and clicking the blue Validate button. Validating checks the connection to your Amazon S3 account by providing an error message or a success message.

Your backups are now saving to your server locally as well as to Amazon S3 (as long as “retain backups in the default backup directory” is selected in Backup Configuration. If you remove this these will only be stored at the Amazon S3 server and not locally).

If you have any questions regarding setting up your server to push WHM backups to Amazon S3 our helpful support team would be happy to assist you. In addition, our line of VPS servers with WHM are ready to be configured for this type of setup whenever you need them.

The Most Helpful Humans In Hosting™

We pride ourselves on being The Most Helpful Humans In Hosting™! Our support staff is always available to assist with any Dedicated, Cloud, or VPS server issues 24 hours a day, 7 days a week 365 days a year.

We are available, via our ticketing systems at support@liquidweb.com, by phone (at 800-580-4986) or via a LiveChat for whatever method you prefer. We work hard for you so you can relax.

About the Author: Joel Parks

Latest Articles

How to Edit Your DNS Hosts File

Read Article

How to Edit Your DNS Hosts File

Read Article

Microsoft Exchange Server Security Update

Read Article

How to Monitor Your Server in WHM

Read Article

How to Monitor Your Server in WHM

Read Article