#!/usr/bin/env bash
echo "Optimizing Remote Database..."
ssh -C [email protected] "cd ~/site.com/current && php artisan telescope:clear"
echo "Synchronizing Local with Remote..."
ssh -C [email protected] "mysqldump --default-character-set=utf8mb4 staging" | mysql staging
echo "Staging Synchronized to Local Successfully."
ssh -C [email protected] "mysqldump --default-character-set=utf8mb4 production" | mysql production
echo "Production Synchronized to Local Successfully."
#!/usr/bin/env bash
echo "Optimizing Local Database..."
php artisan telescope:clear
echo "Synchronizing Remote with Local..."
mysqldump staging | ssh -C [email protected] "mysql staging"
echo "Staging Synchronized to Remote Successfully."
echo "Writing to Production Remote is Forbidden! Nice Try Gangsta. UnComment if you dare!"
#mysqldump production | ssh -C [email protected] "mysql production"
#echo "Production Synchronized to Remote Successfully."