Scheduling a MySQL restore

7 posts / 0 new
Last post
#1 Fri, 12/17/2010 - 13:50
joealdeguer

Scheduling a MySQL restore

Webmin's mysql module makes it super easy to schedule a database backup. I wish it also had a way to schedule a restore. Thank you.

  • Joe
Fri, 12/17/2010 - 13:54
andreychek

Howdy,

Are you by chance using Virtualmin as well?

If so, you may be able to use Virtualmin, and the command line tools, to accomplish what you're after.

If you were to generate a backup of the Virtual Server in question -- you could use the options available in "virtualmin restore-domain" to restore the database feature of that domain.

-Eric

Fri, 12/17/2010 - 14:15 (Reply to #2)
joealdeguer

Hi Eric,

Yes, I am using Virtualmin GPL. I have used the backup and restore function of Virtualmin. It works flawlessly restoring the whole virtual website or parts of what I want to restore including the database. I have scheduled backup for all of the domains. I even have a scheduled backup for the mysql database separately. I was hoping the developers would also add a way to schedule a database restore just for mysql.

Sat, 12/18/2010 - 04:41
Locutus

Forgive me, but I'm wondering if a "managed scheduled restore" is a feature that so many users would use... I'm a bit puzzled why you'd want to regularly and automatically restore a backup that's intended for use when the server crashes? :)

Tue, 12/21/2010 - 18:23 (Reply to #4)
joealdeguer

I have a second web server which pulls via rsync files on the first server which have changed in /public_html. I also used rsync to pull the mysql dump from the first web server. I then run a script which does a mysql restore on the second web server using the most recent mysql dump file.

On the second web server acting as a backup I also have a scheduled nightly backup for all of the websites. Just in case an error gets pulled from the first webs server by rsync I am able to fix it.

But you bring up a good point this will only work if the server was just acting as a backup.

Tue, 12/21/2010 - 18:23
Locutus

Ooh, okay I see. Ever pondered using MySQL Replication for this purpose instead of shuffling full dumps around? :)

Mon, 06/09/2014 - 23:02
s3w47m88

My company is also looking for a solution because we have SaaS demonstration sites that need to be restored on a daily basis. Anyone ever find a solution for this? Thanks!

Topic locked