Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View campegg's full-sized avatar
🤔
Thinking.

Cam Pegg campegg

🤔
Thinking.
View GitHub Profile
@campegg
campegg / mysqlsync
Last active April 17, 2020 16:48 — forked from samhernandez/mysqlsync
Sync remote mysql database to local over ssh
#!/bin/bash
# This script assumes you have ssh access to a remote server
# Both databases are backed up to sql files in the same directory
# this script is executed from.
# Usage:
# 1. Make sure this file is executable with `chmod +x mysqlsync`
# 2. Set the credentials for the variables at the top
# (Remember, no spaces around the '=' sign)
# 3. Run it from a directory where you'd like the backup files to go: