#!/bin/bash echo "Dumping DB...." ssh mstiller@maketank.net mysqldump -C --result-file=/tmp/mstillersql1.sql mstillersql1 echo "Copying here" scp -C mstiller@maketank.net:/tmp/mstillersql1.sql /tmp/ echo 'Dropping local' mariadb --skip-ssl -u root -h localhost --password=rootpW --port=3306 \ -e 'drop database mstillersql1; create database mstillersql1' echo 'Importing new...' mariadb --skip-ssl -u root -h localhost --password=rootpW --port=3306 \ mstillersql1