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 (Lite) (https://vborg.vbsupport.ru/showthread.php?t=201319)

Paul M 01-09-2009 10:00 PM

vB Database Backup (Lite)
 
As of 24 Nov 2017 this modification has been withdrawn.

Note: I did not write the original version, but rather have modified & adapted it.

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, first for vb 3.6, 3.7 and now for vb3.8.

The original version was by Trigunflame and the rights to the code were bought by Zoints (David Chapman) in January 2007. Later in 2007 David gave me permission to release my adaptation.

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.

As of version 3.8.002, most of the options have moved to the ACP in vBulletin Options >> vBulletin Automatic Backup

Notes:
* I will not be adding anything new to this modification.
* This is a Lite version to allow people to use the basic backup functionality on 3.8.


History:

v3.8.001 : First version for vB 3.8.
v3.8.002 : Moved most of options to ACP.
v3.8.003 : Moved more options to ACP.
v3.8.004 : Gzip option backported from vb4 version.
v3.8.005 : Split option backported from vb4 version, close option removed.
v3.8.006 : Fix php 5.3 deprecated warning.


Brandon Sheley 01-10-2009 03:54 PM

Thanks for updating this Paul :)
When I go to 3.8, I'll need to update my backup mod

SuperDave71 01-10-2009 04:23 PM

Thank you! Works with 3.8 just fine. Thanks Paul!

-Dave

Arcade Fire 01-10-2009 06:22 PM

Thanks Paul!!! ;)

Fungsten 01-10-2009 06:36 PM

Where does it dump it to? TIA.

Paul M 01-10-2009 07:04 PM

Wherever to set it to in the config file.

Fungsten 01-10-2009 07:20 PM

Quote:

Originally Posted by Paul M (Post 1707666)
Wherever to set it to in the config file.

Ooops. Thank you.

rizelim 01-10-2009 08:18 PM

Thanks Paul

puertoblack2003 01-10-2009 09:26 PM

Good job :up: just a heads up in the schedule task section section it's still showing "Automatic Database Backup for vBulletin 3.7" :D

Paul M 01-10-2009 09:48 PM

Thanks, Cron title updated.

Phaedrus 01-10-2009 10:58 PM

Can you think of a reason why it would just stop in the middle of the "post" table every time I run it from the cron, even a cron directly from my site's server, but if I use mysqlbackup and do it using the php directly, it will take a full backup?

shofolofo 01-11-2009 11:21 AM

Thanks paul, I want to ask some .. euhm .. noobish questions


in the configuration file -- I've made file in path site/vb/backups/
backups file is writable and this is the configuration part

// File Saving Information
$backup['DATE'] = 'Y-M-d'; // Backup file date format (See http://uk.php.net/date)
$backup['PREFIX'] = 'Forum-'; // Backup file prefix, applied to all files
$backup['DUMP_PATH'] = 'backups/'; // Path to backups folder, must have a trailing slash, folder must be writable.


I couldn't modify the date because I didn't understand how to write the scheme from php.net , can you give an example please ?


went to cron jobs and pressed " run now "
An error occured during the Backup : Could not open Destination SQL file for writing.

:(


Thanks for you great mods :)

Paul M 01-11-2009 01:27 PM

Quote:

Originally Posted by Phaedrus (Post 1707908)
Can you think of a reason why it would just stop in the middle of the "post" table every time I run it from the cron, even a cron directly from my site's server, but if I use mysqlbackup and do it using the php directly, it will take a full backup?

Maybe your php installation has a timeout ?

Paul M 01-11-2009 01:28 PM

This is not likely to work ;

$backup['DUMP_PATH'] = 'backups/';

Where exactly is your backups folder (in relation to other folders).

KEKforce 01-11-2009 01:33 PM

Quote:

Originally Posted by shofolofo (Post 1708447)
$backup['DUMP_PATH'] = 'backups/'; // Path to backups folder, must have a trailing slash, folder must be writable.



I did $backup['DUMP_PATH'] = './backups/';

Works for me.

Adem GEN? 01-11-2009 08:30 PM

Full path
$backup['DUMP_PATH'] = '/usr/local/******/backups/';

Works for me

Freddy.k 01-11-2009 10:38 PM

Thank you.

Trek 01-12-2009 12:19 AM

Works great, thanks much!

shofolofo 01-12-2009 04:31 AM

Quote:

Originally Posted by Paul M (Post 1708532)
This is not likely to work ;

$backup['DUMP_PATH'] = 'backups/';

Where exactly is your backups folder (in relation to other folders).

Quote:

Originally Posted by KEKforce (Post 1708538)
I did $backup['DUMP_PATH'] = './backups/';

Works for me.



Thanks Paul, kekforce ... I did it like ./backups/ and it worked :)



---------------

Is there is a command to add to tar/gz the file then delete it the SQL one ?
the backup is taking about 500 mega :o ...


tyvm

Phaedrus 01-12-2009 07:40 PM

Quote:

Originally Posted by Paul M (Post 1708528)
Maybe your php installation has a timeout ?

Well, it was working for a very long time, then I changed the albums from the database to my files and suddenly when it hits "post" it stops. No other changes were made. Of course, since then I have upgraded to 3.8, but previous to that the 3.7 version ran fine.

starli 01-12-2009 10:11 PM

Hey Paul

I have a question about Item 4
I do not understand where I think the setting for this.
In the Admin CP I find nothing about this.
THE XML has already been uploaded and the Config adjusted.

Sorry for the bad English,
Starli (ger)

buileminh 01-12-2009 10:30 PM

I have not tried it yet... Anybody can tell me if it can email backed up DB to specified email address?

Trek 01-12-2009 10:56 PM

No, it outputs to a folder with incremental folders/table names. Not saying it's not possible, but this doesn't do that. Good idea though.

Quote:

Originally Posted by buileminh (Post 1710301)
I have not tried it yet... Anybody can tell me if it can email backed up DB to specified email address?


Nadeemjp 01-13-2009 05:58 AM

nice. i always had problems cause backing up data base is too complicated for me.
i shall use this.

Paul M 01-13-2009 09:26 AM

Quote:

Originally Posted by starli (Post 1710279)
I have a question about Item 4
I do not understand where I think the setting for this.

Just leave it as is, the default is fine for 99% of people.

Yonatan 01-16-2009 09:40 AM

I get this error when i try to run this task:

Quote:

Could not open Destination SQL file for writing.

Nadeemjp 01-16-2009 12:31 PM

i didnt know how to use it.
i simply uploaded files and imported the product (without editing the php file since i dont know how to do it).

now what happened was, my forum started giving a blank screen with the following error:

PHP Code:

Fatal errorCall to undefined function fetch_require_hvcheck() in /home/familyb2/public_html/forums/global.php on line 486 

and nothing is happening. i tried deleting the files, i tried uninstalling the files, i tried re-uploading the global.php file but nothing seems to work. vbulletin support peopel say if i have modifications installed then they cant help which is obsurd since i only download modifications from this official site.

now can someone tell me what to do?
my url is:
PHP Code:

www.familybunker.com 

i started to download this mod because i dont know how to backup my data and i thought maybe this mod can help me. guys please help me out i am in big trouble.

Nadeemjp 01-16-2009 12:41 PM

one more thing.
up until a few hours, i had 3.8 installed and working fine.

but accidently in the afternoon i pressed the "revert prefs" button in the admincp. i didnt know what happened then, but now that i look at my version of vbulletin, it shows 3.7.3 PL1. i dont know what the heck happened.

am in trouble? cause i dont have any backup of my data:(

joe1989 01-16-2009 01:44 PM

Excellent mod! Love it!

But, I have a question... Why is it not recommended to turn the forums off during the backup? Wouldn't that be a good idea to close the forums temporarily during the backup?

Any info?

Also, how large does the forum need to be before this mod starts suffering from PHP timeouts? I have the newest PHP version (5.1.6).

Thanks again!

Paul M 01-16-2009 04:43 PM

Quote:

Originally Posted by Nadeemjp (Post 1714616)
one more thing.
up until a few hours, i had 3.8 installed and working fine.

but accidently in the afternoon i pressed the "revert prefs" button in the admincp. i didnt know what happened then, but now that i look at my version of vbulletin, it shows 3.7.3 PL1. i dont know what the heck happened.

am in trouble? cause i dont have any backup of my data:(

Your problems are nothing to do with this mod, you should open a support ticket at vb.com

Phaedrus 01-16-2009 04:46 PM

Quote:

Originally Posted by Phaedrus (Post 1710101)
Well, it was working for a very long time, then I changed the albums from the database to my files and suddenly when it hits "post" it stops. No other changes were made. Of course, since then I have upgraded to 3.8, but previous to that the 3.7 version ran fine.

Suddenly it started working again.

Excellent. I didn't think it was the Mod's fault (especially considering even Crons run from my server itself still wouldn't work) but I hoped I could figure out what was wrong. I never did, but Cron Backups are working again, just as scheduled, without data loss.

FazerPaint 01-16-2009 07:51 PM

Great Mod Paul, I love it......

Downloaded, followed the instructions and it worked first time..............BRILLIANT:up:

Nadeemjp 01-19-2009 12:45 AM

Quote:

Originally Posted by Paul M (Post 1714869)
Your problems are nothing to do with this mod, you should open a support ticket at vb.com

yeah now i know that and my problem is fixed.
the problem that i have with this mod is, in the instructions it is written:
Code:

2. Set your choice of options in the mysqlbackupconfig.php file.
I dont have any clue how to do that. so i am asking for some help that either tell users like me who dont possess much of technical knowledge on how to do it, or give a link to some tutorials. but tutorials can take long to comprehend, the best thing would be to please mention the optimum example of the mysqlbackupconfig file.

also, i have no idea how to create and place a folder where the backup data gets stored. so i am asking for help in this regards.

thanx

Trek 01-19-2009 06:19 AM

You should have uploaded the files via FTP or something for vBulletin, use the same program to create the folder you want to put the files in.

joe1989 01-19-2009 07:35 PM

Can someone address my questions (post #29)??

Paul M 01-19-2009 10:16 PM

Quote:

Originally Posted by joe1989 (Post 1714678)
Excellent mod! Love it!

But, I have a question... Why is it not recommended to turn the forums off during the backup? Wouldn't that be a good idea to close the forums temporarily during the backup?

Any info?

Also, how large does the forum need to be before this mod starts suffering from PHP timeouts? I have the newest PHP version (5.1.6).

Thanks again!

1. Because the code that turns it back on fails sometimes, leaving your forum closed.

2. If php is set-up correctly then timeouts should not happen.

joe1989 01-20-2009 01:26 PM

Quote:

2. If php is set-up correctly then timeouts should not happen.
Aren't timeouts possible when using vbulletin's built-in backup feature? They warn that timeouts are possible with large forums... wouldn't this also be the case here?? Sorry, I don't have much PHP knowledge, so I don't know details and specifics...

Nadeemjp 01-20-2009 10:47 PM

Quote:

Originally Posted by Trek (Post 1717559)
You should have uploaded the files via FTP or something for vBulletin, use the same program to create the folder you want to put the files in.

yes sir i am aware of that, what i dont know is, how to setup my php configuration files so that this mod can automatically backup my database and if it doesnt do it automatically, then at least inthe instructions there should be some procedure mentioned to do so.

plus i dont know how to import the saved backup database in case of an emergency and it would have been nice and kind if the developer or even anyone else had helped cause not everyone that comes here is a software expert.

if not much support is offered here for people like me, well then i guess i will have to uninstall it.

shofolofo 01-21-2009 04:28 AM

Paul, is it possible for me to add tar/gz to the file to save hard disk space while we are away from an internet connection ?

Paul M 01-21-2009 11:52 AM

Not using this mod it isnt.


All times are GMT. The time now is 02:27 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.01452 seconds
  • Memory Usage 1,834KB
  • 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
  • (2)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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