Remote Database Retrieval CronJob
I'd like to set up a cronjob which down开发者_运维问答loads a remote database (nightly) via SSH and creates the database locally (in OSX) using MySql.
Any recommendations?
Something like this should do it:
mysqladmin drop <localdb>
mysqladmin create <localdb>
ssh <host> "/path/to/mysqldump <remotedb>" | /path/to/mysql <localdb>
精彩评论