XF 1.5 Symlink for data and internal_data folders

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.
 

Sunka

Well-known member
Thanks,

@Chris D, just to be sure

Is this correct procedure:

mount new disk into server. Address is:
Code:
/mnt/newdisk

move complete data and internal_data from old disk to new one
Code:
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
Code:
chown -R nginx:nginx /mnt/newdisk

chmod both folders
Code:
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/)
Code:
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.
 

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

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.
 
  • Like
Reactions: Xon
Top