Skip to content

Instantly share code, notes, and snippets.

View marcoslessa's full-sized avatar
🎶
So you think you can tell heaven from hell?

Marcos Lessa marcoslessa

🎶
So you think you can tell heaven from hell?
View GitHub Profile
@marcoslessa
marcoslessa / mysql-docker.sh
Created October 18, 2021 18:28 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE