Backup/Restore All Databases In Laravel Homestead
While destroying a Vagrant box can be a necessary evil, dealing with the repercussions of losing all your databases in the process can be a real pain in the butt. Especially if you are developing many sites under a single Homestead box.
I use TextExpander to expand these commands complete with a dynamic timestamp, which is nice. I use ;mysqlb and ;mysqlr as shortcuts to make the process quick and easy.
Backup All Databases
mysqldump -u homestead -psecret --all-databases > homestead-20150727_0913.sql
Restore All Databases
mysql -u homestead -psecret < homestead-20150727_0913.sql