Backingup and Restoring a MySQL Database between 2 Remote Hosts in Bash
Generally, backing up an SQL DB and restoring it is relatively straightforward. Most of the guides talk about backing up and restoring a DB on the same host. Some might talk about pulling down a backup from a remote location and restoring it locally. But, what about when both of your servers are remote and you're SSH'd into one of them? This took me a bit of digging the first time I did this so I wanted to put this information in one place, whether it's for someone like you who's Googling or for myself in a couple years when I have to do this again.