Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

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
  #772  
Old 12-08-2012, 04:00 PM
Gary_Oak Gary_Oak is offline
 
Join Date: Oct 2012
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djbaxter View Post
In Settings, make sure the folder is specified as follows (assuming it is also in public_html):

Code:
AutoBackups/
Note: this is case sensitive.

The cron job should have been added automatically when you installed this add-on.

varname: cbu_crontask
Title: Automatic Database Backup for vBulletin
Filename: ./includes/cron/cronbackup.php
Product: Automatic Database Backup
Whoops, I had it outside of public_html as its own file folder. Fixed that.

I also had /AutoBackups instead, because it was outside public_html, but I fixed that as well. And yeah, I figured as much that it is case sensitive.

Yes it was automatically added. I had that at first, but then I changed it back to /includes/cron, so I went ahead and changed it back again to ./includes/cron/cronbackup.php right now.

And it worked! I hit Run Now, and so it backed up my Database in 10.605 seconds. And I checked my AutoBackups folder, and the backup is in there! So I got it all working now, thanks so much for your help!

Just one last question. Because I am kinda new to vBulletin and all, once I have the database file on my computer, how do I do a restore with it so I can test it to make sure it's not corrupted and all or if I actually do need to do a restore for some reason?
Reply With Quote
  #773  
Old 12-08-2012, 04:17 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary_Oak View Post
And it worked! I hit Run Now, and so it backed up my Database in 10.605 seconds. And I checked my AutoBackups folder, and the backup is in there! So I got it all working now, thanks so much for your help!
Glad to hear it's working now.

Two more hints:

1. Combine Files = Yes
2. Block Processing = Yes
3. If you have Gzip enabled on your server (most do), I'd recommend GZip Files = Yes

This will make smaller files.

Remember! Old backup files once created are NOT deleted. You need to go into your site via FTP or SSH and delete old backups periodically or you'll eventually fill up the disk.

Quote:
Originally Posted by Gary_Oak View Post
Just one last question. Because I am kinda new to vBulletin and all, once I have the database file on my computer, how do I do a restore with it so I can test it to make sure it's not corrupted and all or if I actually do need to do a restore for some reason?
  1. Create a NEW EMPTY database - because you don't want to overwrite your actual forum database with old data.
  2. Using FTP, download one of the backups to your home computer.
  3. Go into phpMyAdmin and click on Import and follow instructions there.
Reply With Quote
  #774  
Old 12-08-2012, 04:20 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rereading the last few pages it seems we have a common theme here.

The manual run of the cron produces expected output where you expect them in your settings.

But the automatic cron trigger produces in cron logs "Automatic Database Backup for vBulletin - Backup Completed Successfully" yet succesful doesnt mean any file shows up where it should. Tested on multiple times settings.

Running on : vb 4.2.0 Patch Level 3
Reply With Quote
  #775  
Old 12-08-2012, 04:28 PM
Gary_Oak Gary_Oak is offline
 
Join Date: Oct 2012
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by djbaxter View Post
Glad to hear it's working now.

Two more hints:

1. Combine Files = Yes
2. Block Processing = Yes
3. If you have Gzip enabled on your server (most do), I'd recommend GZip Files = Yes

This will make smaller files.

Remember! Old backup files once created are NOT deleted. You need to go into your site via FTP or SSH and delete old backups periodically or you'll eventually fill up the disk.
As am I, I've always loved the vBulletin backup system but I'm not that skilled when it comes to this kind of stuff yet.

I had already done all of those except the Gzip one because I wasn't sure if it would work and I wasn't sure I would need it, but yeah I'll go ahead and set it Yes as well.

I realized that as I was studying up on how vBulletin works some months ago and then as I was deleting some things off my server the past few days. I thought my host gave me unlimited disc space, but what use would I have for extremely old backups anyway? Thanks!

Quote:
Originally Posted by djbaxter View Post
  1. Create a NEW EMPTY database - because you don't want to overwrite your actual forum database with old data.
  2. Using FTP, download one of the backups to your home computer.
  3. Go into phpMyAdmin and click on Import and follow instructions there.
Okay I will try that out, thank you again! To create a new empty database, you go into the cPanel and into MySQL Databases and just create a new database and/or assign a user to it, correct?

Edit;

Quote:
Originally Posted by smirkley View Post
Rereading the last few pages it seems we have a common theme here.

The manual run of the cron produces expected output where you expect them in your settings.

But the automatic cron trigger produces in cron logs "Automatic Database Backup for vBulletin - Backup Completed Successfully" yet succesful doesnt mean any file shows up where it should. Tested on multiple times settings.

Running on : vb 4.2.0 Patch Level 3
I haven't tested the automatic backup yet, as I have it set to 5:30 PM my time and it's 11:30 AM my time right now. I'll check it this evening though, and get back to you as to whether or not it is working for me. I have vB 4.2.0 Patch Level 2, now I can upgrade because I can backup my database. Lol
Reply With Quote
  #776  
Old 12-08-2012, 05:17 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, looking forward to your test results Gary...

fyi, I set my cron this morning to run every hour until I get the auto thing to work, and the cron is running and logging successful every hour so far, but no cigar in my backup folder at all for todays date.
Reply With Quote
  #777  
Old 12-08-2012, 05:24 PM
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
Thanks, looking forward to your test results Gary...

fyi, I set my cron this morning to run every hour until I get the auto thing to work, and the cron is running and logging successful every hour so far, but no cigar in my backup folder at all for todays date.
Where is the backup folder? Are you sure vBulletin has permission to access it? If it's not accessible from the forum root, your server configuration may not allow it, regardless of the permissions.
Reply With Quote
  #778  
Old 12-08-2012, 05:27 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Located in root in non public area.

Thing is the cron works and writes the file if I run it manually, so I know the cron manually triggered will cause vb to write in this directory.

Is that correct thinking?...if it can write on a manual run, it should also to be able to write on a scheduled run?
Reply With Quote
  #779  
Old 12-08-2012, 05:35 PM
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
Located in root in non public area.

Thing is the cron works and writes the file if I run it manually, so I know the cron manually triggered will cause vb to write in this directory.

Is that correct thinking?...if it can write on a manual run, it should also to be able to write on a scheduled run?
I'm not sure that's universally true. If it won't run manually, it almost certainly won't run automatically but the reverse may not hold.

Do you know if your server is running under suPHP or Safe Mode or with open_basedir restrictions enabled, or something similar?
Reply With Quote
  #780  
Old 12-08-2012, 05:49 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No restrictions on my VPS, in fact I have full control, but definetly is not in safe mode.

Just verified my php and "open_basedir" has "no value" installed. "No Value"=no restrictions?

Isnt the only difference between a manual and an automatic cron run, the point of the trigger?
Reply With Quote
  #781  
Old 12-08-2012, 05:59 PM
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
No restrictions on my VPS, in fact I have full control, but definetly is not in safe mode.
How is PHP configured though?


Quote:
Originally Posted by smirkley View Post
Just verified my php and "open_basedir" has "no value" installed. "No Value"=no restrictions?
I would assume so.

Quote:
Originally Posted by smirkley View Post
Isnt the only difference between a manual and an automatic cron run, the point of the trigger?
Honestly not certain. But I know on some forums where I've installed this I have encountered the situation where manual will work and auto will fail and it usually had to do with either permissions or folder outside the forum root.
Reply With Quote
Reply

Thread Tools

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 04:36 AM.


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.07668 seconds
  • Memory Usage 2,337KB
  • 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
  • (1)bbcode_code
  • (11)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