Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Vbulletin Database Backup Pro (Cron Support) Details »»
Vbulletin Database Backup Pro (Cron Support)
Version: 1.9, by Trigunflame Trigunflame is offline
Developer Last Online: Nov 2019 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-20-2005 Last Update: 03-29-2005 Installs: 338
 
No support by the author.

VBulletin Database Backup Pro


NOTICE: 02/03/2006
This system is being "ReBorn" into a new product "Vbulletin Backup Pro" working from a New Codebase and hopefully implementing all the features and fixing all the bugs that were present in the previous releases.
This will be developed specifically for the vbulletin 3.5 system but will probably maintain compatabilty with the pre-existing 3.0 versions.



Summary:

Vbulletin Database Backup Pro is just what it says; a professional tool for your Vbulletin installation. This script will handle the automated backup of your forums in a secure, data-conscious and optimized way.


Introduction:

I want to interest all of you in the ultimate solution for automated database backup from within Vbulletin crontab system.
And potentially more so than a standard crontab.

It's been said, backing up without direct shell access is futile. Wrong. This script is optimized to work just fine with even the largest of databases. (Note: If you have an extremely large database, make sure to use the mysqldump binary option that is selected by default.)

The reason for the creation of this script was due to needing a better system of automated backup. I think me and a lot of people have used either a standard cron system, or brad.loo's small database cron; while they can be somewhat effective, they do not provide the functionality or a total solution without having to extensively mod it.

This system has automatic failovers for MySQLdump, as well as the compression programs used where applicable. All in all, this script is a one stop shop for handling your backup needs on a automatic basis or from the control panel without having to use shell and do a dump manually.


Features:
  • Absolutely NO Vbulletin File Modifications
  • Fully automized backup using the Vbulletin Cron system.
  • Remotely store backups on another srever via builtin FTP libraries.
  • Keep Remote FTP Server directory SYNC'd with Local Filesystem.
  • Dump using shell based, MySQLdump
  • Dump using an optimized PHP based Dump
  • System will Failover from MySQLDump binary straight Into a PHP Dump
  • Various other Failovers for file/dir creations & deletion.
  • Automatic pruning & control of a Specified max backups at any one time.
  • Do a Full database dump OR just the tables you want. Such as post, forums, threads & users.
  • Combine individual tables from a dump into 1 SQL File.
  • Some optimizations for InnoDb tables AND MySQL 4
  • System LOCKS tables while dumping, to prevent database corruption.
  • Can Shutdown forum while backup is in progress. And then REOPEN it automatically.
  • Customized Errors are Logged back into the Vbulletin Cron Log
  • Log path for MySQLDump Errors are customizable as well as Dump Path
  • Customize the Full Paths to binarys that will be used if needed.
  • Customize which execution command to use from PHP if using MySQLdump & certain compressors.
  • Specifiy the Dump Switches MySQLDump will use if selected.
  • Choose the option to Compress your Backups or not.
  • Choose from gzip, bzip2, tar, tar gz, tar bz2, zip for compressions.
  • And Many Many More...

Change log:
  • 3/30/2005 - Patch v1.9
  • Added configuration directives to control the PHP Dump optimizations for MySQL4, InnoDB, and Locking Tables. Some people were having some reported problems with restoring dumps; I believe this may have been the cause, I was using optimizations hardcoded directly for MySQL 4+ support, they are now MySQL 3/4+.
  • 3/25/2005 - Patch v1.8
  • Lots of bug fixes regarding directory paths. If dump path was null, the script would translate the path as starting at / root.
  • Incorporated Full Remote FTP Support.
    This includes remote offloading of dumps, keeping them rotated in sync with local backups, as well as removing Local backups after transfer to Remote Server.
  • 3/23/2005 - Patch v1.7
  • Added ability to Repair & Optimize tables before backup.
  • 3/23/2005 - Patch v1.6
  • A few configuration changes, I didn't save in the mysqlbackupconfig.php
  • 3/22/2005 - Patch v1.5
  • Made the LOCK Tables mechanism optional.
    Note: Use the shutdown Forums option, if you disable the LOCK Tables.
  • Made some adjustments to the cronbackup.php might help with the array_merge errors, and it may not..
  • Took the eval out for the parsing the configuration, they are referenced in hardcode now.
  • Modified the date feature for backups. Remember just use 'mdy' or 'm_d_y'.
  • 3/22/2005 - Patch v1.4
  • Added Backup Rotating (Pruning) support to limit max backups at any one time.
  • Make sure to replace all files, even the mysqlbackupconfig.php as it contains 3 new configuration options.
  • 3/21/2005 - Patch v1.3
  • Added some optimization code for InnoDB. Will help when you reload the database.
  • Reason: Thought about Erwin, I believe he mentioned he used InnoDB.
  • 3/21/2005 - Patch v1.2
  • Modified previous sql/directory cleanup. Better code.
  • 3/21/2005 - Patch v1.1
  • Fix for table prefixes, updated config with info about it.
  • Bug located by: Nexialys
  • 3/21/2005 - Initial Patch v1.0
  • Forgot to add unbuffered streams for fwrite(), this will speed up the compression of the database backup.
  • 3/21/2005 - Initial release. v1.0
  • Script was just released today, waiting on bug reports or any features that may need added to the script that I have missed.

To-Do:
  • AdminCP Based Dump Control Panel to Test & Run Customized Configurations
  • Create a Database Restore Tool, that works through Shell or PHP.
  • Redesign the error system for better debugging, with severity levels.
  • Finish implementing shell based support of Secure SSH SCP File Transfer Support
  • Full Backup of Directory Tree for all of your Files
  • Fix the bug regarding serializing/unserializing on some PHP Setups

Known Issues:
  • Need to work on some of the Raw Windows Commands.
  • Some of the stuff isn't reporting the errors as correctly as they should.

Instructions:
  1. Download the zip file.
  2. Place mysqlbackupconfig.php, mysqlbackup.php, ftp.lib.php, pclzip.lib.php in the forums 'includes' folder.
  3. Place cronbackup.php in your 'includes/cron' folder.
  4. Add a New Cron Task in your Scheduled Task Section. Refer to the screenshot if you need help.
  5. Read and Modify the configuration data in the mysqlbackupconfig.php
  6. Go back to the Scheduled Task section, and run the task. See what messages you get.
  7. Note: pclzip.lib.php is an Modified Version of this open source GPL Php Zip Library.http://www.phpconcept.net
  8. CHMOD 0777 the Directory you will be saving Dumps/Logs to !!!
  9. IF POSSIBLE. YOU OR YOUR HOST SHOULD TURN OFF SAFEMODE/OPENBASEDIR


Help Debugging:

This may come as a surprise to some people.. but I do all my code in notepad, thus it may not look formatted right for people that use editors. If you want to view the code in "my" style, how its supposed to look.
Open my files in Notepad, with Font size 10-Regular-Lucida Console.

As for An errors you may get, when you post;
Post your PHP Version, MySQL Version, and the Error as is Shown Please.


Further Info:

I would like a lot of people to try this script and give me feedback on what you would like changed, what Needs changed and so on and so forth. With the size of this script, it more than likely not gonna work perfect on every system.. so just tell me whats wrong and I will try to get it fixed.


Show Your Support

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

Comments
  #312  
Old 07-19-2005, 02:01 AM
mikehawk's Avatar
mikehawk mikehawk is offline
 
Join Date: May 2004
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sketch42
$backup['HOST'] = 'localhost';// your ip address that your forums are on, most times 'localhost' is sufficient
$backup['USER'] = 'root';// put the username attached to the database your forums are on
$backup['PASS'] = '';//put the password that belongs to that username attached to your database that your forums are on
$backup['DB'] = 'forums';// name of the database your forums are on

Thankyou SOOOO much.
Reply With Quote
  #313  
Old 07-27-2005, 04:00 AM
bspiller82's Avatar
bspiller82 bspiller82 is offline
 
Join Date: Jul 2002
Location: McHenry, Illinois
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any reason why it runs 15+ backups when it runs? Seems that when it does the backup it does it 15+ times in a row! The entry was put in exactly how your readme said.

3915 Daily BackUp 22:55, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3914 Daily BackUp 22:50, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3913 Daily BackUp 22:33, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3912 Daily BackUp 22:32, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3911 Daily BackUp 22:31, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3910 Daily BackUp 22:30, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3909 Daily BackUp 22:29, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3908 Daily BackUp 22:28, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3907 Daily BackUp 22:27, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3906 Daily BackUp 22:26, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3905 Daily BackUp 22:25, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3904 Daily BackUp 22:23, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3903 Daily BackUp 22:22, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3902 Daily BackUp 22:21, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3901 Daily BackUp 22:20, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3900 Daily BackUp 22:19, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3899 Daily BackUp 22:18, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3898 Daily BackUp 22:17, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3897 Daily BackUp 22:16, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3896 Daily BackUp 22:15, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3895 Daily BackUp 22:13, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3890 Daily BackUp 22:07, 26th Jul 2005 MySQL Backup was completed successfully with no errors.
3863 Daily BackUp 22:47, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
3862 Daily BackUp 22:25, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
3861 Daily BackUp 22:24, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
3860 Daily BackUp 22:22, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
3859 Daily BackUp 22:21, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
3858 Daily BackUp 22:20, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
3857 Daily BackUp 22:16, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
3853 Daily BackUp 22:13, 25th Jul 2005 MySQL Backup was completed successfully with no errors.
Reply With Quote
  #314  
Old 07-30-2005, 08:56 AM
micheal332001 micheal332001 is offline
 
Join Date: Apr 2004
Posts: 1,112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there

Gread addon to the vbulletin installed it like 2 mins ago
and all works just fine no problems.
Thanks for this great work
Reply With Quote
  #315  
Old 08-01-2005, 04:29 PM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The config file says:

" Delete Local Backup
-----------------------------------------------------------
Here decides whether or not you would like to delete the
local version of the backup after you have transfered it.
By default this will be 0, but if you still want to do it,
just select 1 and it will leave your local backup in place."

so does this mean that leaving it the default 0 will delete the local copy of the backup? Isn't 1 usually mean "on"?
Reply With Quote
  #316  
Old 08-03-2005, 05:14 AM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When it does backups it sometimes keeps the forum shut and i have to open it when i get up in the morning. Has this happened to anyone else?
Reply With Quote
  #317  
Old 08-03-2005, 05:48 AM
mcyates mcyates is offline
 
Join Date: Jan 2003
Location: Middlesbrough, Cleveland
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to run this in slow time to stop the server from timing out. When i'm doing a back-up i get the error, "cannot find server" when trying to go onto my site. Is there a way around this?
Reply With Quote
  #318  
Old 08-03-2005, 03:02 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope works fine for me.
Reply With Quote
  #319  
Old 08-06-2005, 11:38 PM
loftyasianz loftyasianz is offline
 
Join Date: May 2004
Location: philadelphia, pa
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my host just put us on a dedicated server and now i'm having some trouble with the cron backup. i'm using php version 4.4.0, mysql Client API version 4.1.11, and the errori'm getting is

"Backup

Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing. (backups2/08_06_05.sql))"

i've already checked all of the backup host/username/password/dbname settings and my host has confirmed all of these settings also. does anyone know what the issue might be?

thanks advanced,
warren
Reply With Quote
  #320  
Old 08-08-2005, 02:21 AM
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Posts: 645
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by loftyasianz
my host just put us on a dedicated server and now i'm having some trouble with the cron backup. i'm using php version 4.4.0, mysql Client API version 4.1.11, and the errori'm getting is

"Backup

Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing. (backups2/08_06_05.sql))"

i've already checked all of the backup host/username/password/dbname settings and my host has confirmed all of these settings also. does anyone know what the issue might be?

thanks advanced,
warren
Be sure to have the proper permissions for the destination directory. It seems you don't have write permission in "backups2".
Reply With Quote
  #321  
Old 08-08-2005, 12:34 PM
MikeWalczak MikeWalczak is offline
 
Join Date: Nov 2003
Location: Wisconsin
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
I have used this system a few times before and I am getting this error:
Quote:
Automatic Forum Backup

Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing. (/backups/08_08_05.sql))
I have created a folder "backups" (public_html/backups/) on my remote server and chmodded it to 0777. I also have put a "backups" folder both in my /public_html/ main directory as well as in the forums directory. Both of which are chmodded to 0777.

Any idea why I am still getting this error?

Thanks,
Mike
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 06:50 AM.


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.07412 seconds
  • Memory Usage 2,333KB
  • 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
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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