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.
Asked
Active
Viewed 901 times
-3
-
Can you ssh into the box? – Pravin Umamaheswaran Feb 14 '17 at 21:24
-
ya, but im trying to do without any ssh. I want to see if i can do all these things via logged into my ec2 account. – MarkyMark Feb 14 '17 at 21:32
-
Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306) – jww Feb 15 '17 at 01:29
-
[Web Apps Stack Exchange](http://webapps.stackexchange.com/) or [Webmaster Stack Exchange](http://webmasters.stackexchange.com/) might be a better place to ask, too. – jww Feb 15 '17 at 01:30
1 Answers
0
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.

Mark B
- 183,023
- 24
- 297
- 295
-
thanks. but how do i find the db on my ec2 instance? i see the volume section, but not the exact db – MarkyMark Feb 14 '17 at 21:26
-
Your question is so broad and lacking in details that no one is going to be able to provide you with a more detailed answer. If you don't even know what database engine you are using, or where it is installed, then how would I be able to tell you where it is or how to download it? – Mark B Feb 14 '17 at 21:28
-
sorry but im new to ec2 and learning my way around it. But where can i see my database once i'm logged in my ec2 account? – MarkyMark Feb 14 '17 at 21:31
-
If it's just a database installed on your EC2 server then you can't see anything just logging into the AWS web console. You would have to SSH into the EC2 server and perform Linux commands to find what is installed on there. – Mark B Feb 14 '17 at 21:32
-
see thats what I'm having hard time understanding what ec2 actually is for when everything is done through putty as far as website files and db go... – MarkyMark Feb 14 '17 at 21:33
-
EC2 provides you with a virtual server. When you were doing all that stuff with Putty you were connecting to an EC2 server. The EC2 web console lets you create/delete/backup/secure those servers. Once you need to interface with the operating system (Linux or Windows) running on those servers you have to connect directly to them instead of using the web interface. – Mark B Feb 14 '17 at 21:39
-
1Do you have the connection string for connecting the website to the database? That should tell you about the kind of database you are using and whether or not it lives on the same box. – Pravin Umamaheswaran Feb 14 '17 at 22:21