Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBulletin Cron Based Database Backup Details »»
vBulletin Cron Based Database Backup
Version: 4.2.0.2, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.2.x Rating:
Released: 12-27-2009 Last Update: 11-25-2013 Installs: 1434
Uses Plugins
Additional Files Translations  
No support by the author.

As of 23 Nov 2017 this modification has been withdrawn.

This is a cut down version based on a backup system written by Trigunflame for vb 3.0. It is a simple vBulletin cron trigged php system that does a dump of your database - either as one complete file, or as one file per table. Especially useful now that IB removed the old ACP backup option in vBulletin 4. Files can be (G)Zipped to save space.

All the options are located in the ACP in vBulletin Options >> vBulletin Automatic Backup

To install, download and unzip the files, and follow the instructions in the text file.


History:

v4.0.1 : 28-Dec-2009 : Initial release for vb 4.0.0 Gold.
v4.0.2 : 29-Dec-2009 : Added ability to block process larger tables.
v4.0.3 : 27-Jun-2010 : Added Gzip option.

v4.1.0 : 04-Dec-2010 : Updated for vBulletin 4.1.0.

v4.1.7.0 : 16-Oct-2011 : Updated for vBulletin 4.1.7.

v4.2.0.0 : 24-May-2012 : Updated for vBulletin 4.2.0.
v4.2.0.1 : 17-Mar-2013 : Removed vboptions from backup call..
v4.2.0.2 : 25-Nov-2013 : Fix php 5.3 deprecated warnings, added mysqldump backup.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #782  
Old 12-08-2012, 06:08 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djbaxter View Post
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.
Reply With Quote
  #783  
Old 12-08-2012, 06:13 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #784  
Old 12-08-2012, 08:59 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #785  
Old 12-08-2012, 09:17 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #786  
Old 12-09-2012, 12:10 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smirkley View Post
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.
Reply With Quote
  #787  
Old 12-09-2012, 02:30 AM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #788  
Old 12-09-2012, 02:52 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really? Again, different server configurations react differently. That doesn't work for me on 5 forums I own or admin.
Reply With Quote
  #789  
Old 12-09-2012, 03:01 AM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #790  
Old 12-09-2012, 01:30 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djbaxter View Post
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.
Reply With Quote
  #791  
Old 12-13-2012, 01:03 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:34 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.16377 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (14)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete