1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

large size attachments

Discussion in 'Installation, Upgrade, and Import Support' started by xmlxp, Dec 12, 2010.

  1. xmlxp

    xmlxp Active Member

    to upgrade to any xenforo new release its required to copy the data and internal_data directories from the old xen release folder to the new xen release folder and each of them contain copy of the attachments folder which mean a double copy time and more downtime to the production forums.

    is possible to move the data and internal_data directories outside xen folder and use it for every upgrade to a new release and also control the path of those 2 directories from the admin cp?

    a very large size attachments is a very time consuming when make copy from folder to another folder and make the upgrade process takes a longer time which mean more downtime for large forums.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Why are you copying your data and internal_data directories to a new directory?

    The upgrade process is simply to upload the new package to your current installation which will overwrite the existing files and directories.
    If you use the upgrade package then these 2 directories are not included and won't be overwritten.
     
  3. xmlxp

    xmlxp Active Member

    hello Borgan

    i always give priority to safty, so i dont touch the production working folder and databse. some existing files are modified. so i prefere making awhole new testing environment.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Everything except avatars and attachments are stored in the database so you can do the upgrade as explained in your first post and then just move the data and internal_data directories once you're satisfied it's working fine.

    There is no need to copy them beforehand or have duplicates of both directories - they aren't required for the upgrade process.
     
  5. xmlxp

    xmlxp Active Member

    moving the data and internal_data directories will take very long time in my situation becoause my attachments are around 12 giga and there is one copy inside data folder and another copy inside internal_data folder so the total will be 24 giga
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    If you insist on doing it your way then make a copy of your existing directories (minus data and internal_data) and your database and upgrade that instead.

    Once confident that the upgrade works, perform it on your actual installation.
     
  7. xmlxp

    xmlxp Active Member

    so i understand from your reply that the upgrade can be done without and doesnt require the existance of data and internal_data directories. ofcourse the attachments and avatars will be missing till i copy the internal_data directories after the upgrade is done. No any side effects for that?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    The internal_data directory stores the install-lock.php file though but that will be created when you access the Admin CP during the upgrade process.

    I would though advise only doing this approach as a trial/test upgrade and performing the actual upgrade on your live install, rather than copying the directories over.
     
  9. Mike

    Mike XenForo Developer Staff Member

    You can actually move the data and internal_data directories by defining extra elements in your config.php

    $config['internalDataPath'] - file system path to your internal_data directory. Can be relative or absolute. May be above the web root.

    $config['externalDataPath'] - this really must be a relative path to your data directory. It must be within the web root. For example, you might use "../xf_data", but obviously this requires that your forum not be at the web root itself.

    These options are mostly unsupported though and won't have been thoroughly tested (through widespread use).
     
    Mujahid Taban likes this.
  10. xmlxp

    xmlxp Active Member

    hello Mike
    its great to know its possible to move the data and internal_data directories outside xenforo directory

    here i what i tried to add in the config.php :
    $config['C:\wamp\www\internal_data'] = '1';
    $config['C:\wamp\www\data'] = '1';

    attachents and avatars were missing which mean that 2 lines i added in config.php were incorrect. i would be greatful if you can correct it
     
  11. Mike

    Mike XenForo Developer Staff Member

    It needs to be like this:

    $config['internalDataPath'] = 'C:\wamp\www\internal_data';

    However, as noted, the externalDataPath is not a filesystem path. It needs to be a relative path that is used in URLs. If you're not comfortable with this, I can't recommend changing these values.
     
  12. xmlxp

    xmlxp Active Member

    this is what worked for me:

    1. directories locations
    www/xenforo
    www/data
    www/internal_data

    2. extra elements in config.php
    $config['internalDataPath'] = '../internal_data';
    $config['externalDataPath'] = '../data';

    i tested viewing and uploading all kinds of attachments and every thing is ok

    my questions are
    1. there is no downside to this method in upgrading to new releases and functionalty?
    2. what about security for those 2 directories (data and internal_data) in the current location under www?
     

Share This Page