I’m trying to downsize my droplet.

I tried this article:

https://www.digitalocean.com/community/tutorials/how-to-downgrade-digitalocean-droplets

But doesn’t seem to work. It’s missing all the mysql data (and who knows what else).

Is there any reliable way to do this?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
4 answers

While this process will copy over the raw database files you may run into trouble running the rsync process when MySQL is running.

If the rsync completed sucessfully there shouldn’t be a concern with anything else but you can use mysqldump to migrate your database manually.

by Etel Sverdlov
MySQL is a powerful database management system used for organizing and retrieving data. This tutorial explains how to import and export MySQL databases and how to reset a root MySQL password

I ended up getting this to work I had initially created the smallest $5 droplet. Everything seemed to copy over ok but I guess there weren’t enough resources. I updated to the next one up, rebooted and all worked like charm :-)

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 another 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 detail:

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

The link for the downgrade might have changed so use the link below.

https://docs.digitalocean.com/products/droplets/resources/downsize/

Regards,
Alex

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.