Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
vBulletin Cron Based Database Backup Details »
vBulletin Cron Based Database Backup
Mod Version: 4.2.0.2, by Paul M (Member) Paul M is offline
Developer Last Online: Jan 2018 I like it Show Printable Version Email this Page

This thread is in the Modification Graveyard.
vB Version: 4.2.x Rating: (160 votes - 4.89 average) Installs: 1435
Released: 28 Dec 2009 Last Update: 26 Nov 2013 Downloads: 7175
Not Supported Uses Plugins Additional Files Translations  

As of 23 Nov 2017 this modification has been withdrawn.

This is a cut down version based on a backup system written by Trigunflame for vb 3.0. It is a simple vBulletin cron trigged php system that does a dump of your database - either as one complete file, or as one file per table. Especially useful now that IB removed the old ACP backup option in vBulletin 4. Files can be (G)Zipped to save space.

All the options are located in the ACP in vBulletin Options >> vBulletin Automatic Backup

To install, download and unzip the files, and follow the instructions in the text file.


History:

v4.0.1 : 28-Dec-2009 : Initial release for vb 4.0.0 Gold.
v4.0.2 : 29-Dec-2009 : Added ability to block process larger tables.
v4.0.3 : 27-Jun-2010 : Added Gzip option.

v4.1.0 : 04-Dec-2010 : Updated for vBulletin 4.1.0.

v4.1.7.0 : 16-Oct-2011 : Updated for vBulletin 4.1.7.

v4.2.0.0 : 24-May-2012 : Updated for vBulletin 4.2.0.
v4.2.0.1 : 17-Mar-2013 : Removed vboptions from backup call..
v4.2.0.2 : 25-Nov-2013 : Fix php 5.3 deprecated warnings, added mysqldump backup.

Download Now

Only licensed members can download files, Click Here for more information.

Addons

Show Your Support

  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Vbulletin Database Backup Pro (Cron Support) Trigunflame vBulletin 3.0 Full Releases 443 05 Sep 2008 16:12

  #496  
Old 21 Jul 2011, 18:27
LoveStream LoveStream is offline
 
Join Date: Jan 2009
Hello.

After restore from backup files, the charset went broken.
How could I set the charset for the backup.

Reply With Quote
  #497  
Old 30 Jul 2011, 03:59
marianoblesa marianoblesa is offline
 
Join Date: Jan 2006
Hello

<!-- $Header: F:\CVS/4.x/Auto-backup/Auto-backup.txt,v 1.3 2010/12/04 22:52:33 Pem Exp $ -->

This code must be put somewhere.

Thanks.
Reply With Quote
  #498  
Old 30 Jul 2011, 05:03
Miihawk Miihawk is offline
 
Join Date: Jul 2011
How can I save the backup on a different server, using ftp ?
Reply With Quote
  #499  
Old 02 Aug 2011, 02:55
DevOne5555 DevOne5555 is offline
 
Join Date: Feb 2011
Originally Posted by Miihawk View Post
How can I save the backup on a different server, using ftp ?
To do an automated remote backup is a little beyond the scope of this script I think. That would require third-party server software (e.g. rsync); if memory serves, you need a set of passwordless ssh keys on both ends so the servers can connect automatically. rsync was really designed for backing up tape drives though, not 1 or 2 files. Cpanel has its own automated remote backup function which works over ftp, but it will only back up user accounts. Most web hosting plans offer some kind of automated backup service.
Reply With Quote
  #500  
Old 04 Aug 2011, 05:33
washingtonboise washingtonboise is offline
 
Join Date: Mar 2009
My sql database is five gigabytes.
It appears that this mod can not support large databases.

This times out when ran manually (even if configured to do just 1,000 records at a time), it also fails when ran automatically via cron.
Reply With Quote
  #501  
Old 04 Aug 2011, 13:23
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
There is no limit to the size it will process, if you get timeouts then you need to check php timeout settings and also mysql timeout settings.

That said, with a database that size, I would not rely on just this mod as a backup method.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #502  
Old 08 Aug 2011, 09:03
washingtonboise washingtonboise is offline
 
Join Date: Mar 2009
I have tried some other scripts like mysqldumper, and they are all timing out, probably mysql timeout.

I find it surprising that people are telling me I can log in to SSH, run a few commands (like five), and the server will make a perfect, fail-proof copy of the database.

Are scripts limited from using the same kind of commands like 'wget' that work so reliably in SSH? It's starting to look like I'm just going to have to buy a book and learn the shell commands.
Reply With Quote
  #503  
Old 08 Aug 2011, 14:50
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by washingtonboise View Post
I find it surprising that people are telling me I can log in to SSH, run a few commands (like five), and the server will make a perfect, fail-proof copy of the database.
This is correct, read up on "mysqldump"
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #504  
Old 08 Aug 2011, 16:50
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Back in 08ish I wrote a Perl script that not only backed up the database but also the physical files. I ran it via CRON but it could also be manually envoked. You can use the single line in the code below noting the mysqldump as Paul mentioned. The code below will give you an idea of what you need to read about (mysqldump switches) to get a proper backup.

#!/usr/bin/perl
# System Backup
#------ Variables ------
$backupdir = "/usr/local/DirectoryOfBackUpLocation"; # "." for current
$other_dirs = "/usr/local/DirectoryToBeBackedUp1 /usr/local/DirectoryToBeBackedUp2";
#-----------------------
print "Backup Initiated...\n";
@timenow = localtime(time);
$newfilename = sprintf("%02d",$timenow[4]+1) .
sprintf("%02d",$timenow[3]) . ($timenow[5] + 1900);
print "Using Filename: $newfilename.sql \n";
print "Starting database backup... \n";
system "mysqldump -qce -r $newfilename.sql -u root DataBaseName";
print "Starting Compression... \n";
system "tar czf $backupdir/$newfilename.tar.gz $other_dirs $newfilename.sql";
unlink "$newfilename.sql" || print "Error: Cannot delete file specified: $newfilename - $_ \n";
print "Done. \n"


I use Paul's modification on ALL my sites and am surprised it is not a default VB option. As backups are critical if you run a site.

If I had any requests it would be to have an option to also include the physical files and auto purge backups X days old.
Reply With Quote
  #505  
Old 08 Aug 2011, 16:53
cameraguru cameraguru is offline
 
Join Date: Aug 2011
What a life saver a good backup can be!

Thanks
__________________
CameraGuru Admin

http://www.cameraguru.co.uk
Reply With Quote
  #506  
Old 08 Aug 2011, 21:42
grasshopper1983 grasshopper1983 is offline
 
Join Date: Jun 2010
hi paul

someting wrong here

It make a date folder in my backup folder... but its not wrinting the .sql files...

and still getting the Backup Error : Could not write to destination file

what i'm i doing wrong?

thanks
Reply With Quote
  #507  
Old 09 Aug 2011, 01:42
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
That would be a permissions error.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #508  
Old 09 Aug 2011, 15:02
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by grasshopper1983 View Post
hi paul

someting wrong here

It make a date folder in my backup folder... but its not wrinting the .sql files...

and still getting the Backup Error : Could not write to destination file

what i'm i doing wrong?

thanks
CHMOD the backup folder to 777 Also make sure the backup folder is NOT in your websites directory but rather off of the root of your account.
Reply With Quote
  #509  
Old 18 Aug 2011, 13:20
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Real name: Doug
This may sound silly, but to get it to just backup every day of the week and overwrite the previous weeks files so it doesn't keep growing, do I change the field Y-m-d and put a lower case letter "L" l in that field?

Thanks ..

Regards,
Doug
Reply With Quote
  #510  
Old 18 Aug 2011, 16:13
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Yep, that sounds about right.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 11:21.

Layout Options | Width: Wide Color: