Digital Ocean: Database backups and Import into our Local Docker

Execute from Droplet:

mysqldump -u [USER] -p -h [PRIVATE_CONNECTION_HOST] -P [CONNECTION_PORT] [DATABASE] > [OUTPUT].sql

Download generated file and compress it:

gzip [OUTPUT].sql

Access to our database image:

sudo docker exec -it [IMAGE_NAME] /bin/bash

Dump database:

zcat [OUTPUT].sql.gz | mysql -u [DATABASE_ROOT_ADMIN] -p [DATABASE_NAME]