Pros and Cons of attachement storage type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kafi
    Senior Member
    • Apr 2004
    • 283
    • 3.6.x

    Pros and Cons of attachement storage type

    Attachment Storage Type:

    I can move attachements from db to file system in FTP. What are pros and cons of doing so?

    I have currently 800 MB of attachements in DB.
    Thank you .-)
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    Pros of moving the attachments to the file system are that you query less data from the database, and your database size is also smaller.
    A con is that you don't automatically back up the attachments when you backup your database.
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • kafi
      Senior Member
      • Apr 2004
      • 283
      • 3.6.x

      #3
      Thank you Colin!

      should i udnerstand that PROS is that it lessen the load on server, because reading from file system is a bit easier than from DB?
      Also once I change this, this will works for all old files and als all new coming files?
      I persume there is no way back...

      Comment

      • Guest

        #4
        All old attachments will be sent to the file system when you do the covert. Yes you can go back to storing them in the database at a later time if you want to.

        Also make sure that your attachment folder is above the webroot, this way no one can get to them by using http://www.mysite.com/attachments/.

        Comment

        • steven s
          Senior Member
          • Jul 2004
          • 3722
          • 3.8.x

          #5
          Originally posted by Brad.loo
          All old attachments will be sent to the file system when you do the covert. Yes you can go back to storing them in the database at a later time if you want to.

          Also make sure that your attachment folder is above the webroot, this way no one can get to them by using http://www.mysite.com/attachments/.
          I'm trying to decide whether to move my attachments from the database to a filesystem and this is the first message I read so far.
          In reading above, shouldn't that be below the webroot?
          As in /home/here/public_html?


          Edit:
          Looking at my sql file
          attachment 106 Mb
          Total database 213 Mb
          Since half of the file are attachments, does it make sense to move them to a filesystem?
          Last edited by steven s; Sun 2 Jul '06, 1:20pm.
          ...steven
          www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
          bmwcca.org/forum | m135i.net
          "I tried to clean this up but this thread is beyond redemption." - Steve Machol

          Comment

          • TheOverclocked
            Member
            • Jan 2005
            • 60
            • 3.6.x

            #6
            Originally posted by 1996 328ti
            I'm trying to decide whether to move my attachments from the database to a filesystem and this is the first message I read so far.
            In reading above, shouldn't that be below the webroot?
            As in /home/here/public_html?


            Edit:
            Looking at my sql file
            attachment 106 Mb
            Total database 213 Mb
            Since half of the file are attachments, does it make sense to move them to a filesystem?
            Yes, that is correct.

            I'd do it because I hate large mysql databases

            Comment

            • Removed-1078464
              Senior Member
              • Oct 2004
              • 796
              • 3.6.x

              #7
              Originally posted by Brad.loo
              Also make sure that your attachment folder is above the webroot, this way no one can get to them by using http://www.mysite.com/attachments/.
              "Above" the web root? You mean it cant be at the domain level?

              Such as domain.com/file_attachments

              ?

              I noticed that PHPBB just puts a blank index.php file in the folder and that hides the contents. Cant I do the same thing with Vbulletin too to accomplish this?

              Doug

              Comment

              • TheOverclocked
                Member
                • Jan 2005
                • 60
                • 3.6.x

                #8
                Originally posted by dcpaq2
                "Above" the web root? You mean it cant be at the domain level?

                Such as domain.com/file_attachments

                ?

                I noticed that PHPBB just puts a blank index.php file in the folder and that hides the contents. Cant I do the same thing with Vbulletin too to accomplish this?

                Doug
                I put mine "below" the web root. It just depends on how your hosting account is setup.

                Example:
                /var/www/example.com
                /var/www/forums.example.com

                Mine's setup like above and I put my vbattachments in here:
                /var/www

                It's not accessible via http at all so you don't have to worry about a blank index file.

                But to answer your question directly, yes you *could* make a file index.html and just leave the file blank and it would keep people from seeing the files in the directory. Depending on your hosting, mine I can set it so you can't see the contents of a directory unless you know the specific file name (even if a blank index.html or index.php files doesn't exist).

                Comment

                • Removed-1078464
                  Senior Member
                  • Oct 2004
                  • 796
                  • 3.6.x

                  #9
                  Ill have to try some of these methods.

                  Thanks for sharing.

                  Doug

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...