![]() |
|
Mod Options |
![]() |
|||||||||||
vBulletin Cron Based Database Backup
![]() Developer Last Online: Jan 2018 ![]() ![]() ![]() This thread is in the Modification Graveyard.
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
|
![]() |
||||
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
|
|||
|
|||
Hello.
After restore from backup files, the charset went broken. How could I set the charset for the backup. ![]() No members have liked this post.
|
#497
|
|||
|
|||
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. No members have liked this post.
|
#498
|
|||
|
|||
How can I save the backup on a different server, using ftp ?
No members have liked this post.
|
#499
|
|||
|
|||
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.
The following members like this post: nacaruncr
|
#500
|
|||
|
|||
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. No members have liked this post.
|
#501
|
||||
|
||||
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. No members have liked this post.
|
#502
|
|||
|
|||
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. No members have liked this post.
|
#503
|
||||
|
||||
Originally Posted by washingtonboise
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. No members have liked this post.
|
#504
|
||||
|
||||
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. No members have liked this post.
|
#505
|
|||
|
|||
What a life saver a good backup can be!
Thanks No members have liked this post.
|
#506
|
|||
|
|||
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 No members have liked this post.
|
#507
|
||||
|
||||
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. No members have liked this post.
|
#508
|
||||
|
||||
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.
No members have liked this post.
|
#509
|
|||
|
|||
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 No members have liked this post.
|
#510
|
||||
|
||||
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. No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 09:36.