cancel
Showing results for 
Search instead for 
Did you mean: 

Backup of AWS EC2 instance(magento2 is hosted on it) failure

SOLVED

Backup of AWS EC2 instance(magento2 is hosted on it) failure

I took backup of AWS EC2 instance(magento2 is hosted on it i.e. HTTP://abc/magento2) by creating Image of it. Everything is backed up perfectly in backedup AMI(Amazon machine image).

Backed up AMI IP is now <HTTP://xyz/magento2>

When I run the above IP magento2 webpage is not loading instead its routing to <HTTP:/abc/magento2> .. its not routing to this IP <HTTP://xyz/magento2>

 

Can anyone please help me on this?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Backup of AWS EC2 instance(magento2 is hosted on it) failure

@pachhi05114050 

 

This is due to env.php file and core_config_data table.

 

In <HTTP://xyz/magento2>, you are using same env.php as HTTP://abc/magento2 which having same Database. in that database you can find core_config_data table where base url is defined for HTTP://abc/magento2 so it will redirect to on this only. once you will modify it and clear cache it will redirect to that.

Manish Mittal
https://www.manishmittal.com/

View solution in original post

3 REPLIES 3

Re: Backup of AWS EC2 instance(magento2 is hosted on it) failure

@pachhi05114050 

 

This is due to env.php file and core_config_data table.

 

In <HTTP://xyz/magento2>, you are using same env.php as HTTP://abc/magento2 which having same Database. in that database you can find core_config_data table where base url is defined for HTTP://abc/magento2 so it will redirect to on this only. once you will modify it and clear cache it will redirect to that.

Manish Mittal
https://www.manishmittal.com/

Re: Backup of AWS EC2 instance(magento2 is hosted on it) failure

After modifying env.php and core_config_data it I ran these below commands:-

chmod -R 0777 var/ pub/ generated/

rm -rf var/cache/* pub/static/* generated/*

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy

php bin/magento indexer:reindex

php bin/magento cache:flush

chmod -R 0777 var/ pub/ generated/

 

It worked 

Re: Backup of AWS EC2 instance(magento2 is hosted on it) failure

@pachhi05114050 

 

Great! cheers

Manish Mittal
https://www.manishmittal.com/