Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Cron Job

How to do it?



11:30 pm on Jan 24, 2009 (gmt 0)

5+ Year Member

i am running a site and giving a joomla demo on a sub domain. People will have admin access to this demo account and i want to refresh the database every 2 hours back to the original joomla installation. Please let me know the best way to do it. I am hosting with lunarpages. they have the cron job option. thank you


4:45 am on Jan 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

It's hard to tell you what to do since you don't give even a small hint as to what database software you are using. But, as an example, with Postgrsql I'd do something like this:

dropdb mydatabase
createdb mydatabase
psql mydatabase <myrefreshdata


7:02 pm on Jan 31, 2009 (gmt 0)

5+ Year Member

the database is mysql .


9:39 pm on Jan 31, 2009 (gmt 0)

5+ Year Member

im using the following syntax ... but its not working .. please let me know if im typing something wrong
mysql --user [user name] --password [password] --database [database name] < [saved database]
this is to restore a file from saved database to database name (file)


7:36 pm on Feb 1, 2009 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome to WebmasterWorld, stardust12.

The [saved database] part would need to contain the DROP, CREATE and INSERT statements to bring the database back to it's original state.


Featured Threads

Hot Threads This Week

Hot Threads This Month