where do i get the backed up database

December 31, 2014 3k views

i took a mysql database backup using console by mysqldump command, but now i dont know from where to download the backed up databse

1 comment
  • You usually do a file redirect of the output. From the mysqldump man page:

    A common use of mysqldump is for making a backup of an entire database:
               mysqldump db_name > backup-file.sql
    You can load the dump file back into the server like this:
               mysql db_name < backup-file.sql
2 Answers

@iostar I reread your question and realized you are probably using a web console to your droplet and want to do a file transfer from your droplet to your local machine. The short answer is you can't do it directly from the web console. You need to use a file transfer method, such as secure ftp, or copy to a remote mount filesystem, or as a last resort and it's a small database (let's say < 1Mb) email the file to yourself.

The FTP intro tutorial may help you get started.

by Etel Sverdlov
This tutorial provides some information about FTP and includes some basic FTP commands. Additionally it includes links to the variety of FTP tutorials on the DigitalOcean site. FTP is a way to transfer files between hosts over the internet. It is especially helpful as a way to upload or download files to or from a site quickly.

As above mentioned, you will likely need to do it manually via ssh / ftp / sftp..

Anyway, Locationwise. Its whereever you currently are on the system..

For example.
When you login to your server, Type the command "pwd" This will tell you were your current WorkingDirectory is.. This is where you work from.

So, Say I type PWD and it says.

This means if i type:
mysqldump db_name > backup-file.sql

backup-file.sql will be in /home/myusername/backup-file.sql

If i type:
mysqldump db_name > /root/backup-file.sql

I have above used /root/ as the directory and forced it to store it in this location.

If you dont specify a directory, it will store it where you are working from currently ( PWD to see )

Hope this helps on top of the above answer.

Have another answer? Share your knowledge.