homepage Welcome to WebmasterWorld Guest from 54.237.122.241
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Cron Job
How to do it?
stardust12




msg:3834009
 11:30 pm on Jan 24, 2009 (gmt 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

 

eeek




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

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

stardust12




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

the database is mysql .

stardust12




msg:3839337
 9:39 pm on Jan 31, 2009 (gmt 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)

coopster




msg:3839820
 7:36 pm on Feb 1, 2009 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved