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

XF 1.5 Symlink for data and internal_data folders

Discussion in 'XenForo Questions and Support' started by Sunka, Jul 14, 2016.

  1. Sunka

    Sunka Well-Known Member

    If I move to another disk (mounted) data and internal_data folders, and create symlinks for both folders in Xenforo install path, I do not need to put new paths (internal data path, external data path, external data URL) in config.php, or I have to?

    Paths will be same, because of symlinked folders.
  2. Chris D

    Chris D XenForo Developer Staff Member

    If the paths are the same it shouldn't be necessary to define them in config.php.
    Sunka likes this.
  3. Sunka

    Sunka Well-Known Member


    @Chris D, just to be sure

    Is this correct procedure:

    mount new disk into server. Address is:
    move complete data and internal_data from old disk to new one
    mv /home/nginx/domains/pijanitvor.com/public/data /mnt/newdisk
    mv /home/nginx/domains/pijanitvor.com/public/internal_data /mnt/newdisk
    give permissions for both folders on new disk
    chown -R nginx:nginx /mnt/newdisk
    chmod both folders
    find /mnt/newdisk/ -type d -exec chmod -R 755 {} \;
    find /mnt/newdisk/ -type f -exec chmod -R 644 {} \;
    create symlink with absolute path for both folders in old folder (xenforo installation folder - /home/nginx/domains/pijanitvor.com/public/)
    ln -s /mnt/newdisk/data data
    ln -s /mnt/newdisk/internal_data internal_data


    Is that going to be functional?

    I will ended with moved internal_ data and data folders on new mounted disk. Symlinks for both folder with absolute path will be created in old place (public folder).

    My questions:

    1. With this procedure above, I do not need to put new data and internal_data path into config.php?
    2. When some add-on have files in internal_data folder, there will be no problem to upload them into new disk in internal_data folder?
    3. All new attachments (resources, gallery, post attachments) will be automatically uploaded on new mounted disk?

    I am going to this procedure because I do not have enough space for attachments any more on main disk (for resources, gallery images and post attachments) and I have to buy adittional disk space for my server and move all present attachments there and upload new one also on new disk.
  4. Sunka

    Sunka Well-Known Member

    Should above procedure works OK @Chris D ?
    Thank you
  5. Chris D

    Chris D XenForo Developer Staff Member

    It looks ok, but really this is way beyond the remit of support so any changes of this nature are at your own risk.

    As ever, perform a full back up before making any changes and try to simulate the changes in a test environment first before doing them on your live.
    Sunka likes this.
  6. Sunka

    Sunka Well-Known Member

    Thanks Chris D
    I will be glad to have @Xon opinion too, and also everybody's other opinion is welcome too
  7. Xon

    Xon Well-Known Member

    Sunka likes this.
  8. Sunka

    Sunka Well-Known Member

    disable_symlinks off;
    That is correct value?

    Where to check and edit that module (path to config file of that module)

    chown -R nginx:nginx
    That would be enough I think?
    Xon likes this.
  9. Sunka

    Sunka Well-Known Member

    Just want to confirm that above procedure is valid.
    I have bought 100GB volume on Digital Ocean, mounted on my server and move internal_data folder and data folder to that new volume.
    Symlinks working OK, Xenforo working OK, attachments are working OK.
    Xon likes this.
  10. duderuud

    duderuud Active Member

    Looks okay to me!

Share This Page