Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2002, 07:49 PM
Kumaro's Avatar
Kumaro Kumaro is offline
 
Join Date: Oct 2001
Location: T.O
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default .::Backup DB on Server (Selective Tables) ::.

Problem:
The database of my forums is well over 900MB in size after saving it to my server. This is mainly because of my search index which is basically useless to save since it can be rebuilt. In fact, due to this gigantic DB, I can't even backup anymore because the backup script takes so long that it times out.

Solution:
I noticed that it is possible to backup without certain tables of choise, however I need to keep the backups on the server.

I was hoping somebody could make a hack that allows me to backup the database on the server and be able to deselect the tables I don't want to include.

I think this would benefit many sites with large traffic and databases. Thanks
Reply With Quote
  #2  
Old 08-01-2002, 08:00 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the backupfeature of vb can do that as i know...
Reply With Quote
  #3  
Old 08-02-2002, 02:23 AM
Kumaro's Avatar
Kumaro Kumaro is offline
 
Join Date: Oct 2001
Location: T.O
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no, i don't think you read this properly. You can select what tables to include and not include, but thats only if you are downloading the backup. i want to be able to select what tables to include and not include when saving the backup directly on the server.
Reply With Quote
  #4  
Old 08-02-2002, 10:25 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes sorry was my fault...

hmm, i think you can try this:

open admin/backup.php

find:
PHP Code:
doformheader("backup","sqlfile");
  
maketableheader("Save data to file on server:"); 
below add:
PHP Code:
$result=$DB_site->query("SHOW tables");
  while (
$currow=$DB_site->fetch_array($result)) {
    
makeyesnocode($currow[0],"table[$currow[0]]",1);
  } 
then find this:
PHP Code:
  while ($currow=$DB_site->fetch_array($result)) {
        
sqldumptable($currow[0], $filehandle);
        
fwrite($filehandle"\n\n\n");
        echo 
"<p>Dumping $currow[0]</p>";
  } 
and change it to:
PHP Code:
 while (list($key,$val)=each($table)) {
        if (
$val==1) {
          
sqldumptable($key,$filehandle);
          
fwrite($filehandle"\n\n\n");
                                  echo 
"<p>Dumping $currow[0]</p>";

        }

it should work, because it's the same code used for save to disk
Reply With Quote
  #5  
Old 08-04-2002, 09:24 PM
Kumaro's Avatar
Kumaro Kumaro is offline
 
Join Date: Oct 2001
Location: T.O
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'll try this...i hope it worx...thanks!
Reply With Quote
  #6  
Old 08-04-2002, 09:29 PM
Kumaro's Avatar
Kumaro Kumaro is offline
 
Join Date: Oct 2001
Location: T.O
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm...
i get this when i access the backup file

Parse error: parse error in /usr/local/psa/home/vhosts/411hype.com/httpdocs/forums/admin/backup.php on line 279
Reply With Quote
  #7  
Old 08-04-2002, 09:32 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what is line 279 would help

also i've added a } to my post above, seems i have forgotten it
Reply With Quote
  #8  
Old 08-04-2002, 09:47 PM
Kumaro's Avatar
Kumaro Kumaro is offline
 
Join Date: Oct 2001
Location: T.O
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is really weird...line 256 is the blank line between these codes

PHP Code:
  makeinputcode("separator","separator",",");
  
makeinputcode("Quotes","quotes","'");
  
makeyesnocode("Show column names","showhead",1);

  
doformfooter("Generate");


Reply With Quote
  #9  
Old 08-04-2002, 09:57 PM
Kumaro's Avatar
Kumaro Kumaro is offline
 
Join Date: Oct 2001
Location: T.O
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wait...after that little bracket, it seems to be workin...
Reply With Quote
  #10  
Old 08-04-2002, 10:03 PM
Kumaro's Avatar
Kumaro Kumaro is offline
 
Join Date: Oct 2001
Location: T.O
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay...now i can get on the backup page, but after entering the path to where i want to save it, and then press "Save File", i get these two errors:

Warning: 6 is not a valid File-Handle resource in /usr/local/psa/home/vhosts/411hype.com/httpdocs/forums/admin/backup.php on line 88

Warning: 6 is not a valid File-Handle resource in /usr/local/psa/home/vhosts/411hype.com/httpdocs/forums/admin/backup.php on line 119
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08751 seconds
  • Memory Usage 2,267KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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