Dump MySQL Server DB File in Remote-Server and create a final backup in AWS S3.

Execute the command to configure the remote keys:

ssh-keygen -t rsa -m PEM -f remote-key

Dockerfile for the Remote_Server:

Installation of mysql using docker-compose file:

In this lab first, we build the image using the commands.

root@ip-172-31-17-221:/home/remote-projects# docker-compose build

All servers are ready in Docker:

Access my mysql server from remote-server:

Pull the data1 from mysql server --> remote server:

Create the AWS S3 Bucker:

Create user access in AWS for s3 bucket:

Set environment variables for aws access from the remote server:

replace the keys which we extract in the above configuration -

export AWS_ACCESS_KEY_ID=AKIAYLT72WWPQUY4TSDX

export AWS_SECRET_ACCESS_KEY=oazeKzeOLTjvUWESrhjLcADZrDVcLhObsYcX/bIO

export AWS_DEFAULT_REGION=us-east-1

Push the mysql DB in the AWS S3 Bucket From the remote server:

connection established:

Commands Used In Project:

\==============================================

\=======================================

Have a Good Weekend!

In the next lab, I will automate the whole process using the Jenkins (BASH) -