Below is the procedure used to clone an Amazon EC2 Linux instance (CentOS63) running Magento 1.7.02. The Magneto installation was fully configured with a few test products.
This instance of Linux/Magento was cloned so that I could use the cloned instance as my test/dev instance.
1) Gracefully shutdown the EC2 instance running Magento so that it is in a âstoppedâ state.
2) From the Amazon EC2 management UI âInstancesâ screen select the EC2 instance that was just shutdown, right-click and select âCreate Image (EBS AMI)â.
3) The Image/AMI will take a few minutes to create then from the EC2 Management UI âAMIâ screen select the AMI you just created and right-click then select âLaunch Instanceâ.
4) After the new instance is started connect to the running instance with ssh or putty.
5) Edit app/etc/local.xml change the existing hostname/IP_Address to the new public IP address of the cloned instance that was just launched.
Below is the line that needs to be changed:
6) Update the MySql core_config_table changing the field named âvalueâ where the
âpathâ field = ‘web/unsecure/base_url’ or ‘web/secure/base_url’(if using https).
Below are the sql statements I used:
update core_config_data set value = ‘$New_Hostname_or_IP_ADDRESS’ where path = ‘web/unsecure/base_url’;
update core_config_data set value = ‘$New_Hostname_or_IP_ADDRESS’ where path = ‘web/secure/base_url’;
7) Delete the cache (e.g. rm var/cache/*).
8) Restart the webserver (e.g. service restart httd).
Now you should be able to access the new cloned copy of your magento instance and
access the admin page.