The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

sceduled database restore?

Discussion in 'General Discussion' started by m.bergmannn, Jun 22, 2006.

  1. m.bergmannn

    m.bergmannn Registered

    Joined:
    Jun 22, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    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.
     
Loading...

Share This Page