Welcome to WebmasterWorld Guest from 54.144.72.150

Forum Moderators: bakedjake

Message Too Old, No Replies

Cron Job

How to do it?

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

New User

5+ Year Member

joined:Jan 24, 2009
posts:3
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 20, 2004
posts:875
votes: 2


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)

New User

5+ Year Member

joined:Jan 24, 2009
posts:3
votes: 0


the database is mysql .
9:39 pm on Jan 31, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 24, 2009
posts:3
votes: 0


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)

Administrator

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

joined:July 31, 2003
posts:12533
votes: 0


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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members