0

I'd like to be able to backup my database files from one phpmyadmin server to another, every night. I know it is possible to copy/duplicate using something similiar to :

mysqldump -h [server] -u [user] -p[password] db1 | mysql -h [server] -u [user] -p[password] db2

( I found this in the comments of the following: Copy/duplicate database without using mysqldump )

Though I do not know how I would automatically do this. If anyone could give me an answer or some tips, it would be greatly appreciated.

Community
  • 1
  • 1
Eric
  • 25
  • 4
  • 2
    https://www.google.com/search?q=mysqldump+backup+to+different+server – CBroe Jan 16 '17 at 14:55
  • That shows something similar to what I said and linked, but how would I have it happen automatically? Say at like 5 am everyday? – Eric Jan 16 '17 at 19:46
  • Cronjob, task planer, ...? – CBroe Jan 17 '17 at 08:21
  • I just started learning about cron yesterday but would the following work?
    * 5 * * * root run-parts /etc/daily.backup
    and in that folder have a file containing my code from above?
    – Eric Jan 17 '17 at 13:59
  • You asked specifically about using phpMyAdmin for this project, which basically can't be done — phpMyAdmin is a graphical interface designed to be used interactively. There are plenty of scriptable tools, such as `mysqldump`, which you also asked about and does the job better than phpMyAdmin in cases like this because you can schedule it and don't have to click around manually. – Isaac Bennetch Jan 18 '17 at 01:46
  • Do you have a recommendation on how to get the scheduling done of when mysqldump runs? – Eric Jan 18 '17 at 19:21

0 Answers0