vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Administrative and Maintenance Tools - vB Database Backup Pro (Lite) for vb 3.6 (https://vborg.vbsupport.ru/showthread.php?t=126925)

David Gillaspey 12-30-2006 07:20 PM

The config file has a setting for closing the forum (or not). Is it, in fact, necessary to close the forum during the automated backup?

Thanks.

Sincerely,

David Gillaspey

Paul M 12-30-2006 11:18 PM

If you run your backups in a quite period then no, it's not. I don't use that option.

David Gillaspey 12-31-2006 03:16 AM

OK. Thanks, Paul.

Sincerely,

David Gillaspey

Joey805 01-01-2007 08:48 PM

How does this handle the old backup files? Will it delete backups, say after a week old automatically? Or do they just keep getting placed in the backup folder and you have to go manually delete them so you don't eventually run out of disk space?

Paul M 01-01-2007 09:30 PM

You must manually delete them.

BigJohnny 01-02-2007 11:44 PM

Quote:

Originally Posted by Paul M (Post 1148739)
You must manually delete them.

aww crap.... that was the best feature of the old version.......

oh well.... i like the way this backs up better though :)

Reven 01-07-2007 12:11 AM

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'.

Spun2U 01-07-2007 01:00 AM

Very nice!!

Thanks Paul! :D

zetetic 01-12-2007 10:03 PM

Quote:

Originally Posted by Reven
I've added a bit of code into mysqlbackup.php to compress the resultant SQL file with gzip.

Thanks!

TheFrienzNet 01-13-2007 07:10 PM

Quote:

Originally Posted by Reven (Post 1152290)
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.

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 172643155 bytes) in /usr/local/psa/home/vhosts/frienz-network.com/httpdocs/includes/mysqlbackup.php on line 534

Hmph.. I guess the memory exhausted?

Hellraider 01-13-2007 07:54 PM

Quote:

Originally Posted by Reven (Post 1152290)
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.

Thanks, works fine for me.

Paul M 01-13-2007 11:57 PM

Quote:

Originally Posted by Reven (Post 1152290)
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.

If you don't mind I'll think about borrowing this code and adding some extra options at some point (when I'm not so busy).

92GreenGT 01-18-2007 05:02 PM

I found this mod by searching for backup things, im just now learning about how to do them etc etc. So I will ask this before I post a reply saying I get some error message.hehe

HTML Code:

$backup['DUMP_PATH']        = '/path/to/backups/';  // Path to backups folder, with trailing slash
I dont understand this, not the way everyone else has been asking questions about though. What I dont understand is, am I supposed to go into my FTP and make a folder called whatever I want for the backups to go into? I made a folder on the root I guess(sorry if my terms are wrong) but I made a folder named Backups. If this is correct how would I word the path for that? The rest I understand but this has me confused. Thanks

Menime 01-19-2007 02:18 AM

When I try to run this I get the following error message:

Database Backup

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

madkeen 01-20-2007 01:08 PM

Thank you
Installed and working fine

da420 01-20-2007 02:29 PM

Quote:

Originally Posted by Menime (Post 1162629)
When I try to run this I get the following error message:

Database Backup

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

the location you are saving the file to is not writeable.

Menime 01-20-2007 05:04 PM

Quote:

Originally Posted by da420 (Post 1163480)
the location you are saving the file to is not writeable.

The folder I have it set to is set at 777.

Paul M 01-20-2007 05:38 PM

You may have other (php) restrictions in place.

Menime 01-20-2007 06:22 PM

Could you be a little more specific about that Paul? I keep thinking I am missing something stupid and I can't figure it out.

Paul M 01-20-2007 06:45 PM

Since I have no idea how your server/hosting is set-up then I can't be specific. My guess would be a php open_basedir restriction.

Ahsin1 01-22-2007 09:32 PM

I mm getting this error

Database Backup

Parse error: syntax error, unexpected T_VARIABLE in /home/mohsin1/public_html/includes/mysqlbackupconfig.php on line 18

Help me
Ahsin

Paul M 01-23-2007 01:36 AM

Fix the editing error you have made in mysqlbackupconfig.php

(possibly a missing semi-colon at the end of the dump path line you edited).

Terminatoronly 01-23-2007 02:18 PM

great hack thanks paul installed ;)

TheWhite 01-23-2007 02:29 PM

What are the benefits of using this instead of Mysqldumper?

92GreenGT 01-25-2007 02:18 AM

Well I got the mod installed and ran the cron job to manually test it and it went through.

MySQL Backup was completed successfully with no errors.
Done

Since it said it was done with no errors that means im in the clear right? So if I pull this off my FTP and save it on my computer this will be all I need to run if something ever happens? Sorry for all the idiot questions but honestly this is the first back up I have ever done.:(

-Edit-
Just wanted to say that it closed my forums and opened them after the job was done no problem. Marked as Installed.:)

taydu 01-25-2007 07:56 AM

how do I restore a large database without SSH

Ahsin1 01-25-2007 09:27 PM

Installed working great :)

just wondring is that possible to get only 1 .sql file instead of whole bunch of files like when we back up from Admincp we get only 1 file is that possible with this one? :(

Ahsin

Paul M 01-25-2007 11:04 PM

Just change the combine option in the config file.

Ahsin1 01-26-2007 04:34 AM

aite thanks for ur reply working great now

Ahsin

shungo 01-26-2007 05:01 AM

Thanks for this mod :)

taydu 01-26-2007 08:28 AM

One question, after I restore the database and go to the forum it still say " Forums is close ...." shouldn't it turn on automatically? Just to make sure that i'm not doing anything wrong

Paul M 01-26-2007 09:02 AM

No, you will have to turn it on manually if it's closed (because you backed it up closed).

taydu 01-26-2007 06:19 PM

thanks Paul,

In the future will you include FTP option so it can upload the db to an external server for a second back up? This is a nice feature to have, hope to see it future version.

Thanks

verbs 02-03-2007 05:45 PM

I apologize for being a newb here, but is there a step by step of how/where to install this on my database and then how to turn it on so that it backs up all the information I need automatically?

Quantnet 02-03-2007 09:09 PM

which directory you guys backup to? I backup to the same server my forum resides but given that the backup folder is 777, other people will be able to read my database backup ?

TrIn@dOr 02-05-2007 09:36 AM

Hey Paul, in our site the script halt on "Database Backup" and stays there.

In the FTP, the new date dir is created, but the site is not closed and a sql file is not generated.

3.6.4

Paul M 02-05-2007 10:31 AM

Then you have a problem with your set-up.

Reven 02-05-2007 06:05 PM

Quote:

Originally Posted by TheFrienzNet (Post 1158292)
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 172643155 bytes) in /usr/local/psa/home/vhosts/frienz-network.com/httpdocs/includes/mysqlbackup.php on line 534

Hmph.. I guess the memory exhausted?

PHP obviously ran out of memory. If you have access to php.ini then you can manually increase the allocated memory for PHP, but backups by nature will always be resource intensive.

Quote:

Originally Posted by Paul M
If you don't mind I'll think about borrowing this code and adding some extra options at some point (when I'm not so busy).

Sorry for not replying sooner. Yes, of course you can use the code.

oglsmm 02-05-2007 07:28 PM

You can also create/edit the .htaccess file in your forum directory. Add the line:
Code:

php_value memory_limit 50M
If your host allows this you can boost the allowed memory.

kontrabass 02-07-2007 02:21 PM

I really wish I could use this mod... Is there any chance of a MysqlHotCopy version of this? Or is there already something out there that I'm not finding?

With over 3.5 million post table records and no slave DB server, using mysqldump really isn't an option (downtime would be way too long). :(

Mysqlhotcopy can do the backup in 3 minutes, but I wish I could find a mod like this to shut down / open the boards automatically...


All times are GMT. The time now is 11:37 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.01789 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete