Configure Backups to S3

1. Servers having cPanel control panel

————————————-

In the WHM console, click Backup Configuration, and scroll to the bottom looking for additional destinations. Select Amazon S3 in the Destination Type and Create new destination.

In the configuration page for this destination, give it a name and select the box that says transfer system backups to destination. (It says you should only do this if your connection is encrypted. Amazon S3 is an encrypted connection.)

Enter the name of the bucketAccess Key ID, and Secret Access Key.

 

It should appear as an additional destination at the end of your backup configuration. Click Save Configuration and you’re done. Backups will automatically be transferred to Amazon S3 as soon as they are done, and older backups will automatically be deleted from S3 once they have expired.

 

2. Servers having Plesk control panel

———————————–

Plesk 17.8 supports backup to S3. With this extension, we can store the backups in S3 cloud storage.

https://ext.plesk.com/packages/8762049b-870e-47cb-ba14-9f055b99b508-s3-backup#!

 

3. Servers without control panel

——————————-

Install and Configure the AWS CLI for particular OS

Type aws configure and press enter. Enter the following when prompted:

AWS Access Key ID [None]: Enter the Access Key Id

AWS Secret Access Key [None]: Enter the Secret Access Key

Default region name [None]: Enter the region under which the s3 is created

Default output format [None]: Enter json

In this step, you will use the AWS CLI to create a bucket in S3 and copy a file to the bucket.

Creating a bucket is optional if you already have a bucket created that you want to use. To create a new bucket named my-first-backup-bucket type:

aws s3 mb s3://my-first-backup-bucket

Note: Bucket names must be globally unique

To upload the file my first backup.bak located in the local directory (C:\users) to the S3 bucket my-first-backup-bucket, you would use the following command:

aws s3 cp “C:\users\my first backup.bak” s3://my-first-backup-bucket/

 

Download backup on s3 to local computer

=======================================

s3cmd is an utility that can be used to download the backups from S3 bucket. Please do the following steps:

Install s3cmd

yum install s3cmd

 

We will need to configure using –configure command.

s3cmd –configure

 

We will be prompted with multiple questions about your Amazon storage server. Enter correct details on the prompt screen.

New settings:

Access Key: [your access key]

Secret Key: [your securet key]

Encryption password: Password

Path to GPG program: /usr/bin/gpg

Use HTTPS protocol: False

HTTP Proxy server name:

HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n] Y

Please wait…

Success. Your access key and secret key worked fine 

Now verifying that encryption works…

Success. Encryption and decryption worked fine 

Save settings? [y/N] y

Now, we will be able to use s3cmd to upload/download files Amazon S3 server.

 

Command to recursively download backup:

s3cmd get –recursive s3://bucket_name/bucket_project/backup_directory/backup/  /Amazon

where, s3://bucket_name/bucket_project/backup_directory/backup/ is the backup location where backups are stored and /Amazon, Folder on the local server where we want to get the backup.

Alternatively, we can download the backup to local system via AWS CLI or AWS Console interface.

  • 328 Users Found This Useful
Was this answer helpful?

Related Articles

Custom php settings when you enable Fast-CGI

When you enable fast-cgi, there should be a custom php.ini in the cgi-bin folder of the account.*...

Disk quota exceeded: mailbox is full

Issue:Email fails with the following error message.===Subject: Mail delivery failed: returning...

Can I edit DNS records from my CPanel?

You can edit DNS records from your CPanel by following the instructions in the two CPanel...

CentOS - Hostname Change

Hostname Change There are 4 steps in a hostname change, luckily all the steps are easy....

What Is A Reverse PTR Record?

PTR record or more appropriately a reverse PTR record is a process of resolving an IP address to...

Powered by WHMCompleteSolution