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
  #952  
Old 11-26-2013, 10:38 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Getting this error now after the update:


PHP Code:
Warning: Function set_magic_quotes_runtime() is deprecated in ..../includes/cron/cronbackup.php on line 13

Parse error
syntax errorunexpected T_IF in /home3/nirc/public_html/forums/includes/mysqlbackup.php on line 597 
Reply With Quote
  #953  
Old 11-26-2013, 11:06 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok. Fixed both.

Magic runtime quotes is another deprecated function I wasnt aware of, added a php version check for that as well.

The syntax error was a semi-colon that mysteriously went missing, which I have now put back.


This version actually contains some experimental code that attempts to do backups via mysqldump (rather than all via php).

If you want to try that feature, you must edit a line in the mysqlbackup.php file.

PHP Code:
    var $DTYPE 'php'// php or mysql 
Reply With Quote
2 благодарности(ей) от:
Disco_Dave, Mecho
  #954  
Old 11-26-2013, 11:12 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
Ok. Fixed both.

Magic runtime quotes is another deprecated function I wasnt aware of, added a php version check for that as well.

The syntax error was a semi-colon that mysteriously went missing, which I have now put back.


This version actually contains some experimental code that attempts to do backups via mysqldump (rather than all via php).

If you want to try that feature, you must edit a line in the mysqlbackup.php file.

PHP Code:
    var $DTYPE 'php'// php or mysql 

I'll give it a shot now, for adding that code.

Cheers


Edit I can confirm that this
PHP Code:
    var $DTYPE 'php'// php or mysql 
works for both php and mysql


Best mod on here!
Reply With Quote
  #955  
Old 01-29-2014, 06:19 PM
Meestor_X Meestor_X is offline
 
Join Date: Apr 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I know this isn't your problem, but I could use some advice on how to fix an issue with the automatic backups not completing.
Occasionally, the backup completes. If I try it a number of times, it will complete maybe 1 in 10 times. When it doesn't complete, the backup gets as far as the "user" table and then stops.
I've tried all the settings in the options, like locking, block processing, separate vs single table backups, etc. but nothing seems to fix it.

Just looking for some advice on what setting I might need to change in php or MySQL to stop it from timing out? (I assume it's timing out - I have no access to any logs on the shared server)
Reply With Quote
  #956  
Old 01-30-2014, 08:02 AM
charlesr charlesr is offline
 
Join Date: Aug 2009
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is probably someone who knows what logs to look in to see the problem, but that's not me.... Meanwhile:

Is the user table ok? Try repairing it. You may need to stop mysql first for a successful repair on the user table:

----------
To repair all the tables in the database in centos we stopped it first.
# /etc/init.d/mysqld stop
Then navigated to the database files:
# cd /var/lib/mysql/[databasename]/
Then run the following command:
# myisamchk -r *.MYI
And once complete restart MySQL:
# /etc/init.d/mysqld start
-----------

If it's ok, then do you have a busy forum / is your server powerful enough? I had some odd behaviour until I upgraded and then everything magically worked perfectly.
Reply With Quote
  #957  
Old 01-30-2014, 02:12 PM
Meestor_X Meestor_X is offline
 
Join Date: Apr 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for your reply.
As I mentioned, I'm on a shared server. No SSH, logs or anything useful available.
I can add a php.ini file to make changes and that's about it.
I've repaired the tables using the vBulletin admincp, makes no difference.

I'm hoping there would be a timeout setting that affects whether the backup completes as it's pretty random. I just don't know enough about all the php and mySQL settings.
Reply With Quote
  #958  
Old 01-31-2014, 08:02 AM
charlesr charlesr is offline
 
Join Date: Aug 2009
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you view php info in vbulletin maintenance area, what are all the timeouts set at?
Reply With Quote
  #959  
Old 02-01-2014, 09: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

Most likely php timing out, but really hard to say.

If you use the latest version, you could try the experimental mysql backup method - see post #952
Reply With Quote
  #960  
Old 04-01-2014, 05:43 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has always worked well for me and I've used it on a few sites for a long, long time. Thanks Paul! one of the most useful mods here.
Reply With Quote
  #961  
Old 04-04-2014, 10:01 PM
BBNZowner's Avatar
BBNZowner BBNZowner is offline
 
Join Date: Oct 2013
Location: New Zealand
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Figured I should install this now, I keep forgetting to do regular back ups :P
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 02:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.13461 seconds
  • Memory Usage 2,339KB
  • 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
  • (4)bbcode_php
  • (1)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
  • (16)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)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