The purpose of this article is to provide a guide for setting up Amazon backups. S3 in the WHM interface, as well as the installation steps in the Amazon interface.
Amazon S3 is a service offered by Amazon for data storage, it can also be used for storing cPanel backups. Amazon S3 can perform your backups remotely on Amazon’s servers as well as locally on the server.
This backup will allow you to be protected against the risks of data loss due to problems like the failure of a hard drive.
Please find below the steps to follow:
- Open an Amazon account at https://aws.amazon.com/
- Log in to the AWS console of your AWS Management Console account
- In Storage & content delivery, click S3
- Select Create Bucket to create a new basket
- If you want to keep your backups in their own folder you have to create a new directory using the Create Folder button in the upper left corner. For example, I created a folder called backups to keep backups
- In the upper right corner, select your name, then Security Credentials and when the alert message appears, select Continue to security Credentials
- Select the + sign to the left of the Access Keys access key secret access key) then click on Create new access Key to pair a new key. It is best to download the file when it appears so you can save your identifiers, especially since you will not be able to see them once the box of initial dialogue with this information will be closed, you can also see the access key to form the pop-up message when you click on the Show Access Key link, which also will not be available once the dialog box is closed,
- Connect to the WHM and go to Backup → Backup configuration. Ensure that backups are allowed for all users,
- At the very bottom of the backup page under Additional destinations make sure that type of destination in the box is Amazon S3 Then click on Create new destination
- Use the information in the boxes once select Destination name: It does not matter how you want your backup folder is named in the WHM, it will not affect the connection to the server, Folder: The name of the file that was created to keep backups. If this field is left empty, the root of the basket will be used, Access ID Key and Secret Access Key: They are both provided under the section Show Access Key on your secure credentials page and in the downloadable file when you go to security credentials page. You can copy/paste this information from which is provided to you by Amazon. Timeout: The time, in seconds, that a server will wait for a response from the remote server from Amazon. The default 30 seconds will be sufficient for most backups, however, this data can be increased if you experiment with timeouts when you load backups.
- Once these fields are filled, click Save and Validate Destination
- If all the information is added correctly, the backups page will show a message that will say Success: Destination saved
- You can now allow un-docking of backups and they should be upload to your Amazon S3 account. You can use as Root via SSH to force starting backups, Code: / usr / local / cpanel / bin / backup –force When this function runs it will provide the log that is used for backups, Code: -bash-4.1 # / usr / local / cpanel / bin / backup –force info [backup] Started at Sun Sep 28 12:00:38 2014 info [backup] Process started in background. info [backup] Log file: /usr/local/cpanel/logs/cpbackup/1411923638.log You can use a command like this to verify that the backup runs correctly, Code: tail -f /usr/local/cpanel/logs/cpbackup/1411920835.log You can also use this command to verify that backups are loaded correctly. Code: -bash-4.1 # tail -f /usr/local/cpanel/logs/cpbackup_transporter.log This will show the result showing that the loads have been completed successfully, Code: -bash-4.1 # tail -f /usr/local/cpanel/logs/cpbackup_transporter.log [2014-09-28 12:01:43 -0500] [cpbackup_transporter] info cPanel Backup Transporter Queue Daemon started. [2014-09-28 12:01:43 -0500] info [cpbackup_transporter] cpbackup_transporter – started [2014-09-28 12:01:43 -0500] [cpbackup_transporter] info cpbackup_transporter – Checking queue for tasks [2014-09-28 12:01:43 -0500] [cpbackup_transporter] info cpbackup_transporter – Processing next task [2014-09-28 12:01:43 -0500] info [cpbackup_transporter] Instantiating Object [2014-09-28 12:01:43 -0500] info [cpbackup_transporter] Starting a “copy” operation on the “Amazon Backup” destination ID “rxpoY3vkuP1gI9ZYHemw8abH”. [2014-09-28 12:01:43 -0500] info [cpbackup_transporter] Validating destination path / Backups / 2014-09-28 [2014-09-28 12:01:44 -0500] info [cpbackup_transporter] Path exists [2014-09-28 12:01:44 -0500] info [cpbackup_transporter] Uploading /backup/2014-09-28/accounts/cptest2.tar.gz to /Backups/2014-09-28/cptest2.tar.gz [2014-09-28 12:01:44 -0500] info [cpbackup_transporter] Attempting to upload /backup/2014-09-28/accounts/cptest2.tar.gz to /Backups/2014-09-28/cptest2.tar .gz for destination: Amazon Backup [2014-09-28 12:01:44 -0500] info [cpbackup_transporter] Upload attempt # 1 starting for /backup/2014-09-28/accounts/cptest2.tar.gz to / Backups / 2014-09-28 / cptest2.tar.gz for destination: Amazon Backup [2014-09-28 12:01:45 -0500] info [cpbackup_transporter] Successful transfer of / backup / 2014-09-28 / account
- Log in to your Amazon S3 account and verify that the backups were successful by clicking the Services button in the upper left corner of your Amazon account and select S3. You will be taken to the tree of your files. From there you click on the folder that you chose to keep your backups. In this folder you will find the backups that have been loaded from the server.