How to download dumps of databases from disconnected droplet?

September 30, 2019 101 views
Block Storage Backups

Our server 178.62.63.220 was disconnected from the network after DDoS attack. How we can to download dumps of databases from this droplet now?

2 Answers

Hello,

You can simply use the mysqldump command via ssh in order to export your databases and then copy them anywhere else (either locally or to other server) using scp or rsync.

The command will look like this:

mysqldump -u [username] -p [database-you-want-to-dump] > [path-to-place-data-dump]

So it could be something like this:

mysqldump -u root -p mydatabase > /home/myuser/database-dump.sql

You can check this article as well, because everything is explained in details:

https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-in-mysql-or-mariadb

Let me know if you have any questions.

by Mateusz Papiernik
Being able to import and export your database is an important skill to have. You can use data dumps for backup and restoration purposes, so you can recover older copies of your database in case of an emergency, or you can use them to migrate data to a new server or development environment. This tutorial will cover how to export the database as well as import it from a dump file in MySQL and MariaDB.
  • Unfortunately, I can not enter any command through ssh due to the fact that the droplet has been disabled from Internet access. Please enable access so that I can copy the data. After that, the droplet can be closed.

    • Have you contacted Digital Ocean’s support team and asked them to restore the access to your droplet?

      Hope this is sorted soon.

Have another answer? Share your knowledge.