vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Switching from Database to File System for attachments (https://vborg.vbsupport.ru/showthread.php?t=153501)

DieselMinded 07-26-2007 09:08 PM

Switching from Database to File System for attachments
 
OK im going to do this can someone tell me the correct steps

Thanks

Kirk Y 07-26-2007 09:11 PM

AdminCP -> Attachments -> Attachment Storage Types -> Move from Database into File System

Create a folder somewhere on your server and CHMOD it to 777, and you're done.

DieselMinded 07-26-2007 09:16 PM

Should i Download the attahment table from php my admin first?

Do i create the folder on my root ? I Know i wont be able to trasfer the files via adminCP with our errors , Shoul i first download the attachment table via phpmy admin and upload it to an ATTACHMENTS folder on my root chmoded to 777?

DM

Kirk Y 07-26-2007 09:54 PM

The directions are simple bud, as outlined in my previous post. Just create a folder anywhere in your webspace; it can be in your root or above your root, though it is good practice to create it above public_html so that attachments can't be downloaded manually.

CHMOD that folder to 777.

Follow my directions in my previous post from here on.

ToKey 07-26-2007 11:24 PM

Hey, I was wanting to do this too, but I can't find the attachments section in the admincp.

Where exactly is it?

Edit: Nevermind, I am a retard. Sorry.

Alfa1 07-26-2007 11:39 PM

What are the (dis)advantages of doing this?

Kirk Y 07-26-2007 11:55 PM

Well the advantages are pretty obvious, if you've got a lot of attachments on your board, moving them from the database to the file system will dramatically reduce the size of your database.

On the other hand, you need to keep regular backups of your forum (You should be doing this already, but some people only back up their database regularly), as your attachments are now stored as files.

DieselMinded 07-27-2007 12:18 AM

Is this a flawless transition?

Kirk Y 07-27-2007 12:22 AM

It was for me.

It's always good practice to make a backup to your database before performing any major switches such as this though.

DieselMinded 07-27-2007 12:29 AM

Understood , But i cant backup Via VBAdmin CP i get errors left and right i have to back up Via PHPmyadmin is there some sort of automated phpmyadmin backup program?

DM

Kirk Y 07-27-2007 12:33 AM

The only reliable method of backing up is via Secure Shell (SSH) or Telnet.

Read more here: http://www.vbulletin.com/docs/html/m...atabase_backup

This modification might also interest you: https://vborg.vbsupport.ru/showthread.php?t=126925

Brandon Sheley 07-27-2007 01:08 AM

I've been using this mod
Automatic Database Back-up

Wonder what the differences are between the two ?

DieselMinded 08-02-2007 04:11 AM

Well this didnt go good at all .....

Well I decided to Go ahead and Do the Attachments From Database to File System Thing....

Created Folder on the Server Chmoded it to 777 , Made a 10MB txt back up of the database via phpmyadmin ,

Went in to attachments , Ect...ect....

Trieds 300 per cycle and it errored out

then tried 100 Same result

then 1 and it got a VB DB error and it whiped out my database Whole site GONE

I ran to phpmyadmin to upload the back up and no go it wouldnt let me sign in , Cause of errors the members were getting something to do with max connections , The Server people told me they would upload the database back up from last night (Backed up nightly) , I said ok But they said they cant cause they cant log in either ,,, OH MY GOD !!!!!!!!!!, They told me that blah blah blah 3 DAYS !!!!!!!!

I kept trying to log in and finnaly i got in as i cant upload a 10MB file if i tried i was looking for a way to just snag the attachments table and over write it ... in the mean time the site started working again all by its self ,,,WTF ?

FYI if you ever can not log into mysql cause of massive errors you can try this........

Quote:
This is also a server/host issue. The server has maxed out the number of MySQL connections your host allows you to have. You can try turning persistent connections off in your config.php:

Quote:

// ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
// This option allows you to turn persistent connections to MySQL on or off.
// The difference in performance is negligible for all but the largest boards.
// If you are unsure what this should be, leave it off. (0 = off; 1 = on)
$config['MasterServer']['usepconnect'] = 0;
But if you still have problems after that, all you can do is ask your host to raise the maximum number of connections they allow.
Can i download all the attachments from phmyadmin then upload them to my attachments folder ? How do i make VB call for the attachments from the folder insted of the database and how do i make it start saving in the attachments insted of database I need some help with this as Trial and error is not cutting it , My database back up txt file is over 10MB i cant upload 10MB what am i suppose to do if the site crases ,,, Revert to the hosts back up thats every night ? then its a waste for me to back up before updates as i couldnt upload the back up if i wanted to.


My Sites still messed up Real Slow Ect..... HELP

How do i do this !!!!!!!!!

Can I download all attachments then upload to the attachments folder then click switch to file system?

theOZer 08-22-2007 04:30 PM

Referencing Kirk Y's Post #4:
I've read the vB manual of moving attachments to the filesystem. I know how to work with SSH and/or FTP, how to create directories, but, I can't wrap my mind around "good practice to create it above public_html". Just where IS "above public_html"? Is it above the / root directory shown when I run FTP? Is it when in SSH I'm in my htdocs folder? It's the 777 folder privileges that has me very concerned about where to create an attachment directory.
Also, Has anyone incorporated using .htaccess in the attachment folder? If so, how to do you "make that work"?

Kirk Y 08-22-2007 05:26 PM

Above public_html is your root directory; when you login to your ftp you should normally see a "public_html" folder amongst several others -- depending on your server and configuration. Anything above public_html is inaccessible through the browser, so your attachments are safe from being directly executed; ie: mysite.com/attachments/image.gif.

theOZer 08-23-2007 08:12 PM

Thank you, Kirk Y, for your prompt response and help.
____________________
08/25/07 Postscript -
Moving my file attachments to the filesystem worked like a charm. vBulletin Rules!
I followed the vBulletin Manual Moving Attachments to the Filesystem instructions.
Here's how I "found" my attachment file path, which is asked for in your attachment movement install:
Log in thru SSH, then enter pwd to see your filesystem location, your path.
Here's an attachment file path example:
/kxndxn/homepages/xx/dxxxxxxx/htdocs/your_attachment_directory_name


All times are GMT. The time now is 08:29 AM.

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.01084 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete