View Full Version : vB Database Backup Pro - Convert to run on vB3.5
This modification is no longer supported.
It will remain available for download and use, but the thread is no longer monitored.
When vb 3.5 first came out I was using this backup system (http://www.vbulletin.org/forum/showthread.php?t=78486) on my 3.0 - and having nothing better to use - I converted it to work on vb 3.5.
Since then I have seen numerous requests for a 3.5 version, and even sent my working version to the guy who apparently bought the rights to it in January. So far no new version has ever been released, though I believe Trigunflame is working on a completely new system.
I cannot (afaik) just release my version, as most of the code is still the original, therefore I have spent a few hours today detailing the (smallish) changes I made in order to make this work, and am now releaseing them as an Add-On to the original hack.
Please note that I do not use the ftp function, zipping function, or the mysqldump option, so i have no idea if they work or not. Also, no existing bugs are fixed.
Unless I missed out an actual conversion step then this is offered as is.
I will not add anything new, or spend any time supporting it. This is done simply to allow people to use the old hack on 3.5 until a new [proper] version is supplied by the relevant people.
History:
v1.6 : Missing elements added.
Developer
06 Apr 2006, 17:37
first to install :)
Second Install :D
Great Paul ;)
Codeman05
06 Apr 2006, 18:40
woohoo! thank you!
installed
FYI, the very final step had it's final closing bracket missing, make sure you add it. The file has now been corrected.
Codeman05
06 Apr 2006, 19:02
ummm, I'm getting this when I run the cron manually, any ideas??
I'm going back through the cfgs again to see if I missed anything, but I don't think I did
Invalid SQL:
REPLACE INTO datastore
(title, data)
VALUES
('options', 'about 2 pages of values')
MySQL Error : Table 'datastore' was locked with a READ lock and can't be updated
Error Number : 1099
Date : Thursday, April 6th 2006 @ 01:00:13 PM
Script : http://www.************.com/admincp/cronadmin.php?do=runcron&cronid=21
Referrer : http://www.************.com/admincp/cronadmin.php?do=modify
IP Address : ************
Username : ************
Classname : vb_database
cclaerhout
06 Apr 2006, 19:43
A very big thank !
ummm, I'm getting this when I run the cron manually, any ideas??
I'm going back through the cfgs again to see if I missed anything, but I don't think I didTry setting the lock options to "0" in the config file, you don't really need them.
RS_Jelle
06 Apr 2006, 20:11
Thank you A LOT for this port, I was waiting for it for a long time :)
/me clicks install
cclaerhout
06 Apr 2006, 20:17
I've got the same problem than Codeman05 ; even after having set : $backup['LOCKTABLES'] = 0;
Buczilla
06 Apr 2006, 20:25
Awesome! Thank You!
I've got the same problem than Codeman05 ; even after having set : $backup['LOCKTABLES'] = 0;and $backup['LOCK'] ?
Also try setting $backup['SHUTDOWN'] = 0;
Other than that, sorry, I can't really suggest anything.
COBRAws
06 Apr 2006, 21:49
as always, You're da man!
Codeman05
06 Apr 2006, 21:51
Try setting the lock options to "0" in the config file, you don't really need them.
Well that got past one problem.
Now it hangs at: "Processing posthash : Total Rows = 1"
It is also appears to be creating a SQL file for each table...
oh well, I'll just go back to the using the crontab method. Thanks for the work though!
cclaerhout
06 Apr 2006, 21:52
You've right, just have to config $backup['LOCK'] to 0
Now i've got another error :
"Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)"
I've tried full and relative path with 0777 chmod...
Well that got past one problem.
Now it hangs at: "Processing posthash : Total Rows = 1"
Well you could exclude that table, it's not a necessity.
It is also appears to be creating a SQL file for each table... That's a setting in the config file, set it to suit.
You've right, just have to config $backup['LOCK'] to 0
Now i've got another error :
"Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)"
I've tried full and relative path with 0777 chmod...Is the destination accessible to php (i.e. if it's outside the forum root is basdir protection stopping you). Basically that's a server permission error, not a hack error.
Living in music
07 Apr 2006, 04:58
master coder, thanks! ;)
Living in music
07 Apr 2006, 05:13
member <-> Advanced Designer <-> Member ??? lol...
Wow this is a great mod! Thanks! :)
Wow this is a great mod! Thanks! :)Feel free to click install then. :)
RS_Jelle
08 Apr 2006, 10:09
I've got a little problem: the script goes into a loop: after the last table, it starts again with the first table and over and over again :confused:
I tested it manually and to solve the problem, I needed to restart my server.
mysqlbackupconfig.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Benedict
08 Apr 2006, 23:43
Hi,
This is such a good mod - i hope I can get it to work for me :)
I installed this hack for the first time on my 3.5.4 board. I took the original files and applied your changes.
However I get the following error when I manually run the job:
MySQL Error : Access denied for user 'XXXXXXXX' to database 'XXXXXXXXX'
Error Number : 1044
I run my board on a shared host if that helps :)
Cheers
Benny
Are you sure you did all the changes ? - as that error makes no sense, since it says the user is denied access to the database, but the changes mean it pulls the user details from your vb config file.
I've got a little problem: the script goes into a loop: after the last table, it starts again with the first table and over and over again :confused:
I tested it manually and to solve the problem, I needed to restart my server.
mysqlbackupconfig.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Don't quote me on this, but I seem to recall having the same problem when executing it manually via vbulletin's cron manager back when I was on 3.0... If you allow it to execute automatically, the problem doesn't happen.
Unfortunately, as mentioned in the notes, this is just to convert the necessary bits to make it function in 3.5, any pre-existing bugs in the 3.0 version will still be there, and won't be fixed (at least not by me). :)
99Percent
11 Apr 2006, 07:31
I too hit the snag "Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)"
After a bit of debugging I discovered that an ending backslash for the DUMP_PATH configuration is now required (at least in my box). Perhaps it would be good to change this code:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
with this
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
You're right - I missed that small change in my config file, the bit with the prefix should say this ;
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Instructions updated.
oneglory
11 Apr 2006, 18:42
the backslash still isn't working for me.
oneglory
11 Apr 2006, 19:14
edit: './backup/'; worked
edit: './backup/'; workedYes, it has to be a valid path. I assumed that people actually altered this to their own path as the default is not really a good idea (the backups are available for anyone to download).
oneglory
12 Apr 2006, 04:23
yea mine isn't actually "backup" its named something else, i just put it up here as an example.
99Percent
15 Apr 2006, 01:36
I am still having trouble with this mod. For somereason it is not reading the configuration for the the DB, USER, PASS and HOST, even with the require to config.php added right into the mysqlbackupconfig.php. So it fails over to phpbackup, which I don't want either.
99Percent
15 Apr 2006, 02:14
another correction I am making for mysqlbackup.php:
instead of
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
it should say:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and in mysqlbackupconfig.php
instead of
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
It should say:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
This is what happens when you try and find all the changes you made and end up missing bits - this got missed as well;
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Added to file.
camoman
18 Apr 2006, 21:35
I had this running on 3.0.7 then upgraded to 3.5.4. I have since made the changes listed here and when I execute the task it gives me this error
Fatal error: Cannot instantiate non-existent class: mysqlbackup in /home/****/public_html/forum/includes/cron/cronbackup.php on line 29
and line 29 reads this:
require_once('./includes/adminfunctions.php');$mysqlBackup = &new mysqlBackup($backup, $vbulletin->db);
any help would be appreciated!!
Thanks!
How have you ended up with a line like that ?
If you have followed the instructions then those two bits of code cannot be be together like that. Somethings wrong with your file and that's almost certainly why it fails.
camoman
18 Apr 2006, 22:16
Thanks for pointing that out.. that part is fixed now..
HOWEVEr, I now get this:
Failover was initiated for MySQLDump Binary & An error occured with configuration. (GZ) alone is not compatible for compressing multiple files into 1 archive. Read Config.
And all tables are backedup sepratley in my backup folder???
I also tried to set it to do a .tar archive adn recieved this error:
Failover was initiated for MySQLDump Binary & An error occured outputing a New Tar Archive with the shell Tar Binary (tar -cS --remove-files -f /home/*****/backup/2006-04-18.tar /home/*****/backup/2006-04-18).
If you want the table files combined into one file then set the COMBINE option in the config file to 1, not 0.
The rest I cannot help you with - it's functionality of the (original) hack, which I don't support.
hilfe-forum
05 May 2006, 10:42
"Could not fetch database options. Shutting backup down"
any clue why i do get this emssage after starting the cronjob manually?
aleclee
07 May 2006, 21:42
Don't quote me on this, but I seem to recall having the same problem when executing it manually via vbulletin's cron manager back when I was on 3.0... If you allow it to execute automatically, the problem doesn't happen.If only I were that lucky. :(
Tralala
07 May 2006, 22:01
So far no new version has ever been released, though I believe Trigunflame is working on a completely new system.
LiveWire has his new one here; (http://www.vbulletin.org/forum/showthread.php?t=114097) how do the two back-up systems compare?
Mitendrius
28 Jun 2006, 17:16
I m gettin this error message
Parse error: syntax error, unexpected T_VARIABLE in /is/htdocs/VBulletin/includes/mysqlbackupconfig.php on line 56
Check for a typing error, possibly a missing semi-colon from the line above.
Neo_obs
29 Jun 2006, 11:18
I keep getting this error
Failover was initiated for MySQLDump Binary & An error occured during the MySQL backup. Details (Could not open Destination SQL file for writing.)
I checked and the folder is 777 and inside the forum folder. Do i need to turn safe mode off?
Do you think I can get some personal help as i am now clueless
Yes, you will almost certainly need safe mode off to run this.
Neo_obs
30 Jun 2006, 05:47
how do i turn safe mode off? cause im not familar with linux
Neo_obs
01 Jul 2006, 10:18
thanks paul for this I absolutely love the idea but I cant turn off safe mode.(host wont let me) but i do appreciate your effort and love all your other hacks. Keep up the good work.
Mouse_cats
19 Jul 2006, 08:01
thanks paul installed
I||usi0nz
31 Jul 2006, 18:12
how come i see differently in cron.php i couldn't find some of those things.
Brak's Buddy
31 Jul 2006, 19:19
Mastercoder Paul,
Any idea on what might trigger this error after manually running the schedule:
DB Backup
Processing access : Total Rows = 0
Processing adminhelp : Total Rows = 1240
Fatal error: Call to undefined function mysqli_unbuffered_query() in /home/.griff/c17lm/themppc.com/forums/includes/class_core.php on line 1093
That seems to be a php/mysql problem. You have obviously opted to use mysqli in your config, but php is complaining it can't find a mysqli function.
Mysticales
14 Aug 2006, 19:32
I have this issue.. I had the 3.0.7 version, worked BEYOND my expactions.. took only 2 mins to fully backup a 400 mb SQL database (Well.. was 400 in the backup archive)
However.. this new version after I went to 3.5.4 it took.. um.. 2 hours to do.. it made MORE files in the backup folder vs a .tz file or whatever.. it was slow etc.. Did I mess up in the conversion? Cause a cron job loop? Why did it make more files vs the 1 archive file and what could cause it to change so drastic from 2 min backup process to like 2 hours?
By default, the settings in the conversion are set for one file per table, as that's what I do. Change the combine setting if you want one file. As for time, sorry, no idea.
Mysticales
14 Aug 2006, 20:42
How was it set on OLD mod? 1 file period?
I mean.. just kinda curious what I COULD be doing wrong.
Like I said, change the COMBINE setting to suit what you want, it's a setting in the config file.
Mysticales
15 Aug 2006, 01:29
K, Do you think it would increase the time if it did it one by one?
I mean how big is your backup file? I know we have a large community. Just wondering if maybe I set something wrong up when I converted the 3.0x version over.
My backups total about 500MB, and take about 5 mins to run.
Mysticales
15 Aug 2006, 01:54
Just to be stupid...
What Cron settings did you use? Cause all I can "think" of is that I caused it to loop... but not sure.
Im worried about retrying it again.. cause I had "Lock Tables" enabled.. meaning.. I couldnt even do ANYTHING to restore forum access after I started running it.
I never use the lock tables option, nothing but trouble ....
I'm at work so I can't tell you what options I have, as I have no access to them, I'll look tomorrow.
Mysticales
15 Aug 2006, 02:33
Great! Btw.. thanks for saying "Dont lock tables"
Your guide or somewhere said it was recommended more to prevent locking.
How will this play into effect on a large forum?
rainyleaves
16 Sep 2006, 14:40
I installed like below...
This is what happens when you try and find all the changes you made and end up missing bits - this got missed as well;
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Added to file.
But I got combine error.
I mean that Combined .sql file is empty(0Byte).
And that I changed code like below!!
another correction I am making for mysqlbackup.php:
instead of
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
it should say:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and in mysqlbackupconfig.php
instead of
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
It should say:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
It worked fine!!!!
Thanks 99Percent & Paul ^^
Is the destination accessible to php (i.e. if it's outside the forum root is basdir protection stopping you). Basically that's a server permission error, not a hack error.
well, I think this is error of concern... if we are saving database backups under public_html anybody can download those. Secured way of using this script is to save the backups under root of the server or in the folders which are not accessible via web.
may be a point to look in your future release of this mod.. on the whole this mod is awsome
thanks
may be a point to look in your future release of this mod.. on the whole this mod is awsomeThere is nothing to look at - this will save backups wherever it has permission to - it is up to you (the user) to have the correct permissions set-up to allow it to write where you want it to.
xcingix
11 Dec 2007, 15:35
Any plans for 3.6.8 or 3.7.0?
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.