title: Restore a MySQL Database and Files every 30 mins for a demo site
body: <p>Ok I read this post:</p>
  
  <p><a href="https://stackoverflow.com/questions/4027832/i-need-to-restore-a-database-mysql-every-30-minutes-using-a-cron-job">I need to restore a database (mysql) every 30 minutes using a cron job</a></p>
  
  <p>and the answer was:</p>
  
  <p>mysql -u user -ppassword databasename &lt; /path/to/dump.sql </p>
  
  <p>My question is will that erase the data that is already in the database?  I need to overwrite from a stored MySQL file.</p>
  
  <p>I also then need to overwrite all the files in one directory with a restore directory using cron command.</p>
  
  <p>This is for a joomla install... I have tried 2 different components for joomla to setup a demo site that refreshes every 30 mins but I could not get either of them working.</p>
  
  <p>does anyone have a solution that will totally restore a directory on a cron command?</p>