Admin Extra Discussions  

Go Back   Admin Extra Discussions > Resources > Tutorials > vBulletin Tutorials


Some Details: Posted by Wizzard on 05-02-2010 (10:31 AM), last reply was on 03-04-2010 (07:44 AM). This thread has received 13 replies and been viewed 327 times.

Reply
 
LinkBack Thread Tools
Changing Album Storage Type
Old 05-02-2010, 10:31 AM   #1 (permalink)
Changing Album Storage Type
Wizzard Wizzard is offline 05-02-2010, 10:31 AM

Author of thread
You may find in the future that your database is becoming rather large as your board becomes more and more popular. You may find that the bulk of the database is taken up by files and pictures stored in the database.

A much better way of storing these files and pictures is in the file system itself.

Before proceeding make sure that the folder you want to store your album pictures in exists and is readable with 0777 permissions, if you're not sure how to change permissions check with your host.

Again if you're not sure where to create the folder ask your host.

So here are the steps

Admin CP >> User Albums >> Album Storage Type

You will then be presented with 2 options:

Move pictures into the file system without direct access to thumbnails
Move pictures into the file system with direct access to thumbnails

I would keep the top option selected as it provides added security

Click on Go

Then you will presented with another box asking you where you want the album pictures to be stored.

In here enter the FULL path to the folder in my case:

/opt/lampp/htdocs/vbforum/upload/album

Make sure it's 0777 readable as explained earlier

Then click on go.

vBulletin will attempt to write a test file to this directory, if sucessful you will be then prompted with a dialogue box asking how many pcitures you want to move at a time.

If not you will be asked to check the path and permissions, again if you're not sure ask your host.

Now all of the album pictures will be moved out of the database and into the filesystem, reducing the size of your database.

Wizzard
ADX Dungeon Master
 Wizzard's Avatar
Views: 327
Reply With Quote
Re: Changing Album Storage Type
Old 14-02-2010, 11:04 AM   #2 (permalink)
I Hate Snow
 
Trip's Avatar
 
Default Re: Changing Album Storage Type

Well presented. Depending on your niche, this can make a huge difference in your db size and overall site performance.
Trip is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 14-02-2010, 04:17 PM   #3 (permalink)
Code Monkey
 
Ryan Ashbrook's Avatar
 
Default Re: Changing Album Storage Type

“ Originally Posted by Trip View Post

Well presented. Depending on your niche, this can make a huge difference in your db size and overall site performance.
I, personally, recommend it regardless of niche.

On top of performance, it makes the site easier to backup because storing Albums, Avatars, Signature Pics, Profile Pics, and Attachments in the filesystem drastically reduces the database size.

There is absolutely no reason to store attachments in the database.
__________________
AdminExtra Administrator | Follow us on Twitter! | Become a Fan of AdX on Facebook!
Evolution-X Money/Points System - An AdX Exclusive Product
ImperialBB Developer | My Blog | Twitter | Facebook
Final Fantasy Crystal Cosmo | The Glass Prison (Mildly NSFW)
| Audentio Design

Don't forget to Rate people who perform work for you!

Please do not PM me for coding help. If you need guidance, please post in the appropriate programming help forum for your needs. If you'd like to hire me (or someone else) for custom work, please post in the Site Positions and Contests forum. All unsolicited Coding Help PM's are ignored. Thank You.
Ryan Ashbrook is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 14-02-2010, 04:53 PM   #4 (permalink)
Shaft Central-ish
 
MjrNuT's Avatar
 
Default Re: Changing Album Storage Type

I actually was not aware of this when I first setup 20 months ago.

Thanks for Article as it will surely help me. I especially like that this is not one of those...pick one way and that's it forever.

+1
__________________
MjrNuT is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 15-02-2010, 06:22 AM   #5 (permalink)
AzH
But not *THAT* Azh.. o_O
 
AzH's Avatar
 
Send a message via MSN to AzH
Default Re: Changing Album Storage Type

Excellent. Thank you. I tried to do this previously without success. I have quite a large number of album pictures so this will really help.
__________________
AzH is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 30-03-2010, 04:02 PM   #6 (permalink)
AzH
But not *THAT* Azh.. o_O
 
AzH's Avatar
 
Send a message via MSN to AzH
Default Re: Changing Album Storage Type

Here's a question.

I've just done this yet my pictures table on my database is still 120 mb. When does that data get deleted?
__________________
AzH is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 30-03-2010, 04:23 PM   #7 (permalink)
Code Monkey
 
Ryan Ashbrook's Avatar
 
Default Re: Changing Album Storage Type

“ Originally Posted by AzH View Post

Here's a question.

I've just done this yet my pictures table on my database is still 120 mb. When does that data get deleted?
It will never be deleted, the only thing this does is remove the actual file from the database and place it into the filesystem. It stores them as picture(pictureid).picture or something like that.

Information about the file, that cannot be fetched from the File itself, is stored there (such as File Name, File Size, Description, etc. etc.).
__________________
AdminExtra Administrator | Follow us on Twitter! | Become a Fan of AdX on Facebook!
Evolution-X Money/Points System - An AdX Exclusive Product
ImperialBB Developer | My Blog | Twitter | Facebook
Final Fantasy Crystal Cosmo | The Glass Prison (Mildly NSFW)
| Audentio Design

Don't forget to Rate people who perform work for you!

Please do not PM me for coding help. If you need guidance, please post in the appropriate programming help forum for your needs. If you'd like to hire me (or someone else) for custom work, please post in the Site Positions and Contests forum. All unsolicited Coding Help PM's are ignored. Thank You.
Ryan Ashbrook is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 31-03-2010, 07:31 AM   #8 (permalink)
AzH
But not *THAT* Azh.. o_O
 
AzH's Avatar
 
Send a message via MSN to AzH
Default Re: Changing Album Storage Type

Hrm,

Okay another question. If I wanted to delete that data to reduce the size of my database, could I do it?
__________________
AzH is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 31-03-2010, 02:53 PM   #9 (permalink)
Code Monkey
 
Ryan Ashbrook's Avatar
 
Default Re: Changing Album Storage Type

You can't. That data has to remain present so vBulletin knows that those files actually exists.

If you remove that data, you will lose all Album Pictures.
__________________
AdminExtra Administrator | Follow us on Twitter! | Become a Fan of AdX on Facebook!
Evolution-X Money/Points System - An AdX Exclusive Product
ImperialBB Developer | My Blog | Twitter | Facebook
Final Fantasy Crystal Cosmo | The Glass Prison (Mildly NSFW)
| Audentio Design

Don't forget to Rate people who perform work for you!

Please do not PM me for coding help. If you need guidance, please post in the appropriate programming help forum for your needs. If you'd like to hire me (or someone else) for custom work, please post in the Site Positions and Contests forum. All unsolicited Coding Help PM's are ignored. Thank You.
Ryan Ashbrook is offline   Back to Index Reply With Quote
Re: Changing Album Storage Type
Old 01-04-2010, 03:36 PM   #10 (permalink)
AzH
But not *THAT* Azh.. o_O
 
AzH's Avatar
 
Send a message via MSN to AzH
Default Re: Changing Album Storage Type

Actually, you're kinda wrong.

I just ran repair/optimize on the pictures table. The data was removed from the MySQL database and the pictures remain in the file system.
__________________
AzH is offline   Back to Index Reply With Quote
Reply

Bookmarks

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
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT. The time now is 08:39 AM.
Search Engine Optimization by vBSEO 3.3.2
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Admin Extra 2010
Style & Imagery copyrighted to adminextra.com



adminextra Top