Hello -
Short story is my admin is no longer with us and I’m not that familiar with this setup, so appreciate any help.
We have an Ubuntu droplet for our MySql database: db-droplet We have a volume attached to that droplet and our db tables and data live there: /mnt/db-volume-01
I see in our droplet it has a symbolic link to what I assume is the original location where the db was storing the db table data.
/mysql/db_tables -> /var/lib/mysql/db_tables
We no longer need the volume so we’d like to copy back our data from the volume to the droplet, remove the symbolic link and then detach & delete the volume.
Can anyone please provide the necessary steps and commands to do the above? Much appreciated!
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Greetings!
I can kind of get you there a bit, but some pieces are relative and you’ll need to consider how they impact you because they might be just a little wrong. Where I’m failing the most, which may cause me to be wrong, is drawing correlation between /mnt/db-volume-01 and /mysql. If the additional volume is mounted at /mnt/db-volume-01 and the databases are symlinked from /mysql, then I assume the databases are not on the additional volume. So for my purposes here, I’m going to just make an assumption that the databases are at /mnt/db-volume-01/mysql and work accordingly.
Under my assumption, this is what I’d do:
This is mildly dangerous and may fail, restoring droplet backup should undo the failure.
Jarland