Search code examples
linuxamazon-web-servicesamazon-ec2aws-code-deploy

How to download website files and db from an amazon EC2 instance?


I have a website that is hosted on amazon's EC2 service, and I need to download all the website files and database(s) locally. How can I do this? Also I don't have an S3 storage with amazon, everything is in a EC2 instance.


Solution

  • First export the database to a file. How you accomplish this will depend entirely on what database engine you are using.

    You can optionally bundle everything up using a tar command.

    Then connect to the server with an SFTP client and download everything.