JoomlaPlug!

JoomlaCloner - Backup and Restore Component

OOPS. Your Flash player is missing or outdated.Click here to update your player so you can see this content.
JoomlaCloner - Joomla backup and restore

 
 
JoomlaPlug.com
Welcome, Guest
Please Login or Register.    Lost Password?
How to reinstall a db every x hours ? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: How to reinstall a db every x hours ?
#1869
Epsylon (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
How to reinstall a db every x hours ? 1 Year, 10 Months ago  
I've several demo sites and would like to reinstal my databases, let's say, every 2 hours. I thought I could do this with cron jobs, but it seems that I do not have enough rights on my server (shared server).

So this componant seems to be the good one for me, unfortunately I'm not a pro about php, so could someone help me to write a script to restore a db ?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1872
admin (Admin)
Admin
Posts: 2464
graph
User Online Now Click here to see the profile of this user
joomlaplug JoomlaPlug.com
Re:How to reinstall a db every x hours ? 1 Year, 10 Months ago  
Hi there! You have to check on your server first if JCron Sheduler works properly, and second if you are allowed to use mysqldump server utility, it would make things a lot easier!

So, first here what you would need to do:

1. create a file called cron.php and add in it this code

Code:

<?php echo shell_exec(&quot;mysqldump --help&quot;«»); ?>
2. upload the file on your server 3. Go in JCron cron management and add this file to the cron task, so when creating a cron choose as cron type &quot;SSH command&quot; and as for path try &quot;php /home/.../path_to_cron.php/cron.php&quot; 4. Make sure JCron runs by going in it's Configuration area and enabling it If all works ok, we can make a simple script based on mysqldump which you could use for backup and restore! Ovidiu
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1875
Epsylon (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:How to reinstall a db every x hours ? 1 Year, 10 Months ago  
Thank you for this answer ..

I did what you said, and create a task to run every 10 mn ( */10 * * * *) but unfortunately I don't obtain logs or receive mail notifications, doesn't it mean that mysqldump is not available ?

EDIT : don't know if it's normal, but the check box near UNIX Crontab field put itself to off everytime I go back to the page !!<br><br>Post edited by: Epsylon, at: 2007/01/26 03:26
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1876
admin (Admin)
Admin
Posts: 2464
graph
User Online Now Click here to see the profile of this user
joomlaplug JoomlaPlug.com
Re:How to reinstall a db every x hours ? 1 Year, 10 Months ago  
Could you post here 2 screenshots of your JCron configuration and the second of the edit page of the cron job!

Also, please attach here the php configuration of your site(phpinfo())!

When the cron it runs, at least the time of the &quot;Last time run&quot; field will change, did you notice that changing?

Ovidiu
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1877
Epsylon (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:How to reinstall a db every x hours ? 1 Year, 10 Months ago  
<br><br>Post edited by: Epsylon, at: 2007/01/26 20:58
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1878
Epsylon (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:How to reinstall a db every x hours ? 1 Year, 10 Months ago  
In fact, the last execution time changes if I check the unix crontab (and then it unchecks automatically )

Post edited by: Epsylon, at: 2007/01/26 07:00<br><br>Post edited by: Epsylon, at: 2007/01/26 20:58
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Search JoomlaPlug.com

Download Joomla

All rights reserved to JoomlaPlug.com ©2006-2008!
Site powered by Joomla!