Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Automatic Database Back-up Details »»
Automatic Database Back-up
Version: 1.0, by Logikos Logikos is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.5.4 Rating:
Released: 04-25-2006 Last Update: 04-25-2006 Installs: 140
Additional Files Is in Beta Stage  
No support by the author.

Automatic Database Back-up



Keywords
Automatic, Database, Backup, Cron

What this does
This is a port of Brad's hack that can be found here. This will backup your database using the vBCron system in vBulletin and send the file to a directory that you specified in the vBulletin Options area.


IMPORTANT NOTE TO ALL THAT USE THIS SCRIPT
This script invokes an outside process that runs in the backround on your server to backup and compress your database. It is important to remember that this is not an instant process, do not enter you ftp as soon as the script says it is done and try to download your backup. It will likely be incomplete and your server will probbly still be writting the file to disk.

I ussally give the process an hour or two before I mess with the file, larger databases will take more time of course.

To do list...
  • Time to install: 5 minutes
  • Queries to run: 0
  • File Mods: 0
  • Templates to edit: 0
  • Templates to add: 0
  • New Phrases: 5
  • New Plugins: 0

Credits
Thanks to Brad for allowing me to port this.

Install This Product
Show your support and click the install button!

Testing Information
I've been using this for vBHackers.com since I first upgrade. I have all my backups being sent to a directory, outside of the public_html. I've yet to experiance any problems. I have had to use one of the backups before, and all worked well.

Product History
Wednesday, April 26, 2006 - Public Released

Help & Support
Before asking for support, please make sure you have done all the necessary changes! If you still need support, please post a reply here and double check that you have clicked the Install Button. I will try to support this hack the best I can. Support is not guaranteed!

Please post any bugs and errors here. Hope you like it, feedback is always welcomed!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 05-01-2006, 08:17 AM
jamshed jamshed is offline
 
Join Date: Nov 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hay

when i hit Scheduled Task Manager on Run Now i got problem :S

Code:
Invalid SQL:

			INSERT INTO upload_cronlog
				(cronid, dateline, description)
			VALUES
				(25, 1146474570, 'Saved backup of databse to /public_html/forum/XXXX on 05-1-2006 at 5:09am (file name 05-1-2006.tar.gz');

MySQL Error  : Table 'slipenc_vb.upload_cronlog' doesn't exist
Error Number : 1146
Date         : Monday, May 1st 2006 @ 05:09:31 AM
Script       : http://www.XXXXX.com/forum/admincp/cronadmin.php?do=runcron&cronid=25
Referrer     : http://www.XXXXXX.com/forum/admincp/cronadmin.php?do=modify
IP Address   : XXXXXXXXXXX
Username     : XXXXXX
Classname    : vb_database
help plz
Reply With Quote
  #73  
Old 05-01-2006, 10:16 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Jamshed, It looks like your log_cron_action() function was changed. The default vBulletin table is called cronlog. In your error, it is showing up as upload_cronlog.

What is your table_prefix named? You can find the name by opening the /includes/config.php file and looking for:
PHP Code:
$config['Database']['tableprefix'
I also need you to post your log_cron_action() function. Open /includes/functions_cron.php and search for:
PHP Code:
function log_cron_action($description$nextitem
Post the code in between the brackets ({}). The default vB function is:

PHP Code:
function log_cron_action($description$nextitem)
{
    global 
$vbulletin;

    if (
defined('ECHO_CRON_LOG'))
    {
        echo 
"<p>$description</p>";
    }

    if (
$nextitem['loglevel'])
    {
        
/*insert query*/
        
$vbulletin->db->query_write("
            INSERT INTO " 
TABLE_PREFIX "cronlog
                (cronid, dateline, description)
            VALUES
                (
$nextitem[cronid], " TIMENOW ", '" $vbulletin->db->escape_string($description) . "')
        "
);
    }

Also, does this happen on all your task managers? Try running another one and let me know if the same thing happens.
Reply With Quote
  #74  
Old 05-01-2006, 10:38 AM
tqvn2004 tqvn2004 is offline
 
Join Date: Sep 2005
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cann't get this hack to work on my site! I did as instructed, and chmod the folder as 777, but there is no output sql file when I try to run the cron task!

My host does not specify _SERVER[PATH_TRANSLATED], _SERVER["DOCUMENT_ROOT"] is "/customers/x-cafe.com/x-cafe.com/httpd.www/", therefore I set the File Dump Path as "/customers/x-cafe.com/x-cafe.com/httpd.www/forum/backups". And the backups folder is 777. I received no error message when running cron task, it said DONE. But no file is outputed! Please help!
Reply With Quote
  #75  
Old 05-01-2006, 12:59 PM
jamshed jamshed is offline
 
Join Date: Nov 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LiveWire Big Thanks problem solve..:banana: :banana:
Reply With Quote
  #76  
Old 05-01-2006, 02:47 PM
creedmaniac creedmaniac is offline
 
Join Date: Jan 2006
Location: South Carolina
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by creedmaniac
is this supposed to create a date.sql and a date-error.sql everytime it runs? (i'm hoping it's supposed to be making the error.sql...cuz if it's not something's wrong with mine...it's going to the correct folder though so i don't know what else would be wrong)
you skipped me livewire
Reply With Quote
  #77  
Old 05-01-2006, 09:00 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@creedmaniac and tqvn2004: Upload the attached file anywhere on your site and send me a PM of the link so I can check your server settings.

Didn't mean to skip
Reply With Quote
  #78  
Old 05-02-2006, 02:50 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@creedmaniac: Thanks for the quick PM! Okay make sure that your File Dump Path setting is set to the following.

I would suggest place this in a folder outsite of the public_html folder for security reason. To do this, log into your website via FTP. This will place you in the /home/inara/ directory. Create a folder and name it whatever you want. I named mine databack.

Once you have finished that. Log into your admincp panel and make your way to the Database Backup Settigs. This is under the vBulletin Options. Make your your File Dump Path settings is set to /home/inara/databack (no ending slash). Then run the cron and give it a good 15 mins to transfer the database to that folder. The time all depends on the size of your database. Let me know if that fixed it.
Reply With Quote
  #79  
Old 05-02-2006, 02:57 AM
ConqSoft's Avatar
ConqSoft ConqSoft is offline
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 686
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about an option to have it keep the last X number of backups, and rotate out the old ones as needed? (Sorry if this has already been suggested; I didn't read the whole thread.)

Thanks!
Reply With Quote
  #80  
Old 05-02-2006, 08:15 AM
hadog hadog is offline
 
Join Date: Jan 2006
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LiveWire
get any time to check on my problem? Mysql5 and autobackup?
Reply With Quote
  #81  
Old 05-02-2006, 08:25 AM
rmxs rmxs is offline
 
Join Date: Apr 2006
Posts: 419
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks very Usefull
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 03:44 PM.


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.04954 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete