-3

I have a live demo site for some purpose. Public visitors can login as admin and change what they want. I need to reinstall (refresh with first original data and files) database and ftp periodically (ex:per 1 hour)...

Do you guys know any open source script for this purpose? I do not want to code myself if it available already...

thank you for everyone

optional
  • 92
  • 6

1 Answers1

3

You don't need a "solution" for this: this takes only a single line in a cron job: you use sqlite as database and then all you need to do is execute a simple cp command every hour.

arkascha
  • 41,620
  • 7
  • 58
  • 90
  • thank you for answer. its not possibel to use sqlite. Mysql is database. But you give me idea to use cron job at least ftp replace. thank you... – optional Apr 19 '14 at 12:09
  • 1
    Ok, if you really _must_ use mysql, then it is _two_ lines: `cp -pr ...` for the files and `mysql ...` to load the database from a previous dump. – arkascha Apr 19 '14 at 12:12