vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Administrative and Maintenance Tools - vBulletin Cron Based Database Backup (https://vborg.vbsupport.ru/showthread.php?t=231481)

smirkley 12-08-2012 06:08 PM

Quote:

Originally Posted by djbaxter (Post 2389369)
How is PHP configured though?

Thats what I meant, php safe mode off.

Ya know?,.. I think I am remembering when I first tested this the auto cron did work when I was setting it up for test, but using a public directory.

I think I am going to try that again just for gigs.

But in the event it does work in a public directory, I still cant wrap my head around why it will work manual, and not in auto.

I will report back shortly.

Thanks for your help dj.

smirkley 12-08-2012 06:13 PM

Hey, was just getyting ready to shut down, thought I would give it a look-see before I went off to do some errands,..

And the cron had just run on auto, and the cron had just SUCCESSFULLY written the file to where I have it set for.

Now that is weirder than science lol.

Of course it has logged as successful.

Ya know what?..I am not going to change anything and just keep an eye on it for a few more hours.

Gotta run some errands, brb.

smirkley 12-08-2012 08:59 PM

Back,...and after some thought,..

I know that a pageview with the footer load is what triggers the cron to run all scheduled tasks at hand scheduled.

So I am thinking this.

That the cron, if it misses it scheduled trigger, has a small window of time before the chedule expires. If it expires, it doesnt run until the next round of scheduling events.

I am left to wonder if the missed schedule somehow still leaves "completed" status in the cron log even though the cron was not triggered by a pageload. The appearance would be that it ran and completed in the logs, but the fact is it didnt compile the file as it wasnt triggered in the scheduling window.

This would explain it not working, and then working while I was wrapping things up before I left, as I had checked my forum just prior. It triggered at 5 minutes after the schedule I had set, as well as a couple other crons that were similarly scheduled.

Right now I have my auto backup cron scheduled to run every hour on the hour. But my site isnt heavily trafficked, so I will just keep an eye on it the next day or so.

smirkley 12-08-2012 09:17 PM

OK, just looked at my cron logs, been gone for a couple hours, and my site hasnt had a pageload short of a spider.

Auto backup hadnt run.

Looked at my scheduled crons and had 5 crons that hadnt run and were overdue, by as much as 2 hours.

I did a pageview on my site, went back and the cron schedule ran one cron and every subsequent page view of my site resulted in one cron being run. The auto backup was the last on the list, so it in essense, took 5 pageviews to trigger the run, and I checked my backup directory, and sure enough, the file was compiling.

This is the takeaway, for those with less than popular sites, just one pageview only triggers just one cron, and if several are stacked up to be run in their schedule, then those lower in the list will not run until their turn on pageview occurs.

This of course doesnt fully explain why my logs are populated with successful runs when they werent.

I will know for certain the next few days, and am going to watch it work. And I will watch this thread to see others opinions.

Thanks again.

djbaxter 12-09-2012 12:10 AM

Quote:

Originally Posted by smirkley (Post 2389413)
OK, just looked at my cron logs, been gone for a couple hours, and my site hasnt had a pageload short of a spider.

Auto backup hadnt run.

Looked at my scheduled crons and had 5 crons that hadnt run and were overdue, by as much as 2 hours.

I did a pageview on my site, went back and the cron schedule ran one cron and every subsequent page view of my site resulted in one cron being run. The auto backup was the last on the list, so it in essense, took 5 pageviews to trigger the run, and I checked my backup directory, and sure enough, the file was compiling.

This is the takeaway, for those with less than popular sites, just one pageview only triggers just one cron, and if several are stacked up to be run in their schedule, then those lower in the list will not run until their turn on pageview occurs.

This of course doesnt fully explain why my logs are populated with successful runs when they werent.

I will know for certain the next few days, and am going to watch it work. And I will watch this thread to see others opinions.

Thanks again.

Also, the auto backup won't complete if you already have a backup stored in the backup folder.

smirkley 12-09-2012 02:30 AM

Yes it will, I verified it deletes the same name file just prior to compiling the backup, and then compresses into gzip, if options are setup that way.

I watched it happen real-time.

djbaxter 12-09-2012 02:52 AM

Really? Again, different server configurations react differently. That doesn't work for me on 5 forums I own or admin.

smirkley 12-09-2012 03:01 AM

Regardless, after the posts above, I noted that a couple of hours logged off, someone musta visted my site enough to trigger the cron for backups, as the same date gzip file now had a write date a half an hour ago.

I did though in fact watch the cron work in real-time in my ftp.

Paul M 12-09-2012 01:30 PM

Quote:

Originally Posted by djbaxter (Post 2389439)
Really? Again, different server configurations react differently. That doesn't work for me on 5 forums I own or admin.

Then you have a permission problem, it always deletes any existing backup with the same name.

smirkley 12-13-2012 01:03 PM

After several days of operating this I feel that this mod works great.

I could not rely on my host providing backups in a fashion I deem necessary, and I could not rely on myself performing a manual database backup consistantly. My last restore prior turned into a nightmare. And now I feel good that I have and will maintain 31 backups for the last 30-31 days in a file system that all I have to do is download for off-site storage with my files in one clean swoop of my ftp.

I found that if I set my cron for a daily backup for the early hours of the morning that the cron has usually triggered within an hour or two of the trigger time. Works every time. If it were set for the evening hours, there is a risk the cron may miss its trigger for that day, so AM is best for me.

Thanks again Paul


All times are GMT. The time now is 12:47 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01935 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete