开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜