sceduled database restore?

m.bergmannn

Registered
Jun 22, 2006
1
0
151
Hello everybody.

I hope somebody can help resolve my problem.

I need to restore every 60 mins. my MySql database. That because i want to create an demo CMS where the people can make changes but every hour i want to restore the original status.

Somebody has some tips for me? Can i do it with a CronJob?

Many thanks for help

Regards
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Yep, you can do this with a cronjob.

Just write a script to redirect your sql file into "mysql" and call that from cron.

Don't forget to put a "USE <database name>;" on the start of your SQL file.