How do reverting from an s3 backup

From PheonixSolutions
Jump to navigation Jump to search

How do reverting from an s3 backup

First, we need to enter the server on the terminal then follow the below steps.

Prerequisites

Before starting, ensure you have:

1. Server root login credentials.

Step -1

Go to the below path

 cd /home2/example/

Step -2

Please login to AWS login in the user account

Go to the s3 bucket in the AWS account inside

 1. Go to the s3 bucket in the AWS account inside
 2. Amazon S3 > buckets > hosting 1-phoenixsolution > select which date you want (16.03.2023) > Accounts > then select do you want the file (example.tar.gz) 
 3. Select example.tar.gz then copy S3 URL
4. Copied URL s3://hosting1-pheonixsolutions.com/2023-03-16/accounts/example.tar.gz

Step -3

Go to the terminal and follow the below steps

Go to this path

 cd /home2/example/

Step -4

If you want backfile to do this below commands

 aws s3 cp s3://hosting1-pheonixsolutions.com/2023-03-17/accounts/example.tar.gz .

step -5

Next, give ls whether check the tar copied or not. If copied the tar file untar the tar file. Please follow the below steps

 tar -xzvf example.tar.gz

Step -6

If the tar file is completed to untar files it comes to the file example.

Step -7

Follow the below steps

 cd homedir
 ls

There having public_html change the public_html to a different name follow the below commands

 cp -pr public_html public_html_bk

Step -8

Public_html_bk files want to move this path /home2/example/

Follow the below step for moving the file to another path this file

 mv public_html_bk /home2/example/

step -9

you need to change public_html_bk to public_html. First, you want to remove the old public_html then change the name below the command

 mv public_html_bk public_html

After finishing please check

Give ls it shows public_html