Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-25-2002, 08:09 PM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Backup Mode For Forums

I am due to begin backing up and restoring our MySql db to a new server (we are quickly outgrowing the old one, and will be adding a new second server to handle the MySql ONLY, hence i will be leaving everything else in place, but the db will have to be moved).

Our DB is HUGE...so this process will take over an hour, and more likely close to 3-4 to complete. During this time, i understand nothing can be written to the DB, because it would then not be accurate on the new server, and those updates would be lost. However....the mysql dump doesn't take NEARLY as long as it takes for the server to rebuild a DB from the .sql file.

I know i am not alone in wishing for this...so i am tossing it out there in hopes one of you geniuses can come up with a solution.....

Is there a way to set the entire set of forums to READ ONLY during a backup.....preferably with a BIG notice at the top of all pages that READ is enabled for their convenience, but no post views will be counted, and no posting will be allowed until the system is out of maintenance mode?

This would at least enable our users to be able to search for info.....rather than have a simple "Board closed" notice.

So....which one of you guys is gonna make my whole Holiday Season???
Reply With Quote
  #2  
Old 12-25-2002, 09:02 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, maybe the easiest way would be to modify db_mysql.php to check the queriestring first, and if it contains UPDATE or INSERT it would ignore it....

i think it should be easy to do, no admin options or something like that, just a little strstr() php edit
Reply With Quote
  #3  
Old 12-25-2002, 09:29 PM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any chance you can tell me how to do that??? Or do i need to spend a few hours with my PHP books looking for the info to change?

I was actually kind of hoping for a tiny hack into the ADMIN CP, so that you could choose whether the boards should be on, off, or in "Maintenance Mode"......but then again, i never denied being a bit of a brat.

i would offer to pay for it...but that seems to irk people here.
Reply With Quote
  #4  
Old 12-25-2002, 09:39 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, i could (i thin ) code an ACP thing for it, but not for today, and i don't know when i'm back next time

so, just the tip
open db_mysql.php
function query:
find
PHP Code:
    $this->query_id mysql_query($query_string,$this->link_id);
    if (!
$this->query_id) {
      
$this->halt("Invalid SQL: ".$query_string);
    } 
replace with:
PHP Code:
if(!strstr(strtoupper($query_string),"UPDATE") and !strstr(strtoupper($query_string), "INSERT")) {    $this->query_id mysql_query($query_string,$this->link_id);
    if (!
$this->query_id) {
      
$this->halt("Invalid SQL: ".$query_string);
    }} 
save the original as well
when you upload the hacekd file, no writing queries would be run anymore...
i don't know if it would work, because session also uses the updates but, just test it out
Reply With Quote
Reply


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 07:10 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.03412 seconds
  • Memory Usage 2,192KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete