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

Reply
 
Thread Tools
vB Database Backup Pro (Lite) for vb 3.6 Details »»
vB Database Backup Pro (Lite) for vb 3.6
Version: 2.12, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.6.x Rating:
Released: 09-17-2006 Last Update: 10-09-2006 Installs: 582
Auto-Templates
Re-useable Code Additional Files Translations  
No support by the author.

This modification is no longer available or supported.

When vb 3.5 first came out I was using this backup system on my vb 3.0 - and having nothing better to use - I converted it to work on vb 3.5 (here) and since then I have cut it down and adapted it for vb 3.6.

The original version was by Trigunflame and the rights to the code were bought by Zoints (D.Chapman) in January. A while ago David gave me permission to release my adaption, but until now I haven't got round to it. Trigunflame did mention a few months ago he was working on a new version, but nothing ever appeared.

I have stripped out much of the extra stuff that I do not use (or indeed, could not get to work). This is a simple (lite) version that does a php based dump of your database either as one file, or one file per table. It's been in use on our forum since the day 3.6 was installed.

Notes:
* I will not add anything new to this, or spend vast amounts of time supporting it.
* This is a Lite version to allow people to use the basic 3.0 backup functionality on 3.6.


History:

v2.10 : First internal version.
v2.11 : Bug fixes, some code changes.
v2.12 : Initial Public Release.

Show Your Support

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

Comments
  #552  
Old 02-18-2008, 02:51 AM
Robbey Robbey is offline
 
Join Date: Jan 2008
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
Fix the error in your config file is what you do.

Whatever you edited (on line 14 I would guess) has a mistake in it that you need to correct.
I didnt edit anything in that file though.
Reply With Quote
  #553  
Old 02-18-2008, 11:49 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

Then your file is corrupted. There is no such error in the proper copy.
Reply With Quote
  #554  
Old 02-18-2008, 01:35 PM
Robbey Robbey is offline
 
Join Date: Jan 2008
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
Then your file is corrupted. There is no such error in the proper copy.
I was using notepad, I used wordpad and it made it better, kept on having whacky characters for spaces.

Thanks. Great hack. Worked with no errors.
Reply With Quote
  #555  
Old 02-19-2008, 02:37 AM
sparky5693 sparky5693 is offline
 
Join Date: Feb 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Reven View Post
I've added a bit of code into mysqlbackup.php to compress the resultant SQL file with gzip. My database is about 35MB, and it's making it 5MB.

If you want to do the same, here is what to do. Please note, though, that this will only work if you have chosen to combine all data into one SQL file and not split each table into its own file.

File: ./includes/mysqlbackup.php

FIND (lines 525 to 527):
PHP Code:
                // Free Memory
                
$this->MYSQL->free_result($rows);
            } 
ADD BELOW:
PHP Code:
            // Compress file
            
if(extension_loaded('zlib') && $this->COMBINE)
            {
                echo 
"Creating gzip file from SQL file<br />"vbflush();

                
$file fopen($this->FILE'r');
                
$data fread($filefilesize($this->FILE));
                
fclose($file);

                
$file gzopen($this->FILE'w9');
                
gzwrite($file$data);
                
gzclose($file);

                
rename($this->FILE$this->FILE '.gz');
            } 
You must also have the zlib extension compiled into PHP. Most shared hosts will have zlib installed as well as most PHP installations in general. The script will not attempt to compress the file unless zlib is installed. You can find out if you have zlib by entering the Admin CP and going to Maintenance > View PHP Info and looking in the Configuration Command section for '--with-zlib'.
If I start using this, and merge all sql data into the one file as mentioned, do I need to make any other changes to be able to use the backup this will create?
Reply With Quote
  #556  
Old 02-20-2008, 10:10 PM
92GreenGT 92GreenGT is offline
 
Join Date: Jan 2005
Location: Big Stone Gap, VA
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had this working before, but now that we switched servers I can't figure it out to save my life.

Here is what I have as my path in the backupconfig file:
'/var/www/vhosts/mysite.com/httpdocs/back-up/'

Is this not right for a path? The folder is CHMOD to 777, so techically it should work correct?
I still get the error when I go to "Run Now" on the scheduled task manager. On the main page of the admin panel it says "Server Type - Linux Safe Mode". Does this have any reason as to why I can't get it to work? Thanks!

-Edit-
Where it says mysite.com, I actually have my forum url. I didn't want someone to mention that as a problem, lol.
Reply With Quote
  #557  
Old 02-21-2008, 07:10 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

Based on that, "../back-up/" should work.
Reply With Quote
  #558  
Old 02-21-2008, 10:07 PM
92GreenGT 92GreenGT is offline
 
Join Date: Jan 2005
Location: Big Stone Gap, VA
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still doesn't work:

Database Backup

An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)

Whats weird, is it seems to make a folder for the backup inside the correct folder, but there is never anything in the folder? If it's creating a folder inside the correct folder, wouldn't that be the correct path? I can't understand why it would make a folder with the date but be empty? Thanks!
Reply With Quote
  #559  
Old 02-22-2008, 06:07 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

Sorry but i cant help you with server permissions, talk to your host.
Reply With Quote
  #560  
Old 02-23-2008, 01:12 AM
92GreenGT 92GreenGT is offline
 
Join Date: Jan 2005
Location: Big Stone Gap, VA
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
Sorry but i cant help you with server permissions, talk to your host.
So thats why its making the folder but not putting anything in it becuase its not allowing it to write?
Reply With Quote
  #561  
Old 02-24-2008, 11:46 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

Quote:
Originally Posted by 92GreenGT View Post
So thats why its making the folder but not putting anything in it becuase its not allowing it to write?
Correct, your server is not allowing the write operation.
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 05:27 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.05946 seconds
  • Memory Usage 2,325KB
  • 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
  • (2)bbcode_php
  • (5)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
  • (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