AlterBrains • Synchronizing two folders
Page 1 of 1

Synchronizing two folders

Posted: May 18th, 2015, 8:55 am
by Julian
Hi everybody,

a while ago I bought Mighty Sites and after testing around ... it´s a great component that gives fantastic possibilites. However ... the bad side is that after merging about five or six websites they went down in speed like hell. EasySocial needet 8 Seconds for a pageload, and I am on a dedicated server

So I decidet to only share some databases, not the whole website. Mostly I want to share the Userdatabase (EasySocial) Through all my websites, so users can log in everywhere with the same account. This brings me into a problem: Avatars, Albums,...

As most of the userdata is stored on the same folders, the solution could be to keep the files synced. And this leads into the question: Is it possible to define some folders and keep them synced? I would love to define the folders for User-Avatars, User-Albums and some other stuff (mostly it´s the media-folder of Joomla) to keep in sync, while all other files stay.

It would be totally enogh to do it with a cron all 5 Minutes.

All the best, Ju lian!

Re: Synchronizing two folders

Posted: May 18th, 2015, 8:57 am
by Julian
I am not a coder ... but just to share an Idea:
Could it work with the .htaccess to redirect ALL file-processes of one folder to a different folder?

If all my Joomla-pages would be redirected to use one master media-folder, could this solve the whole topic?

All the best, Julian!

Re: Synchronizing two folders

Posted: May 18th, 2015, 1:20 pm
by Admin
Actually yes, but better just use a symbolic link.
Usual redirect won't help if the code checks for physical file presence.

Re: Synchronizing two folders

Posted: May 18th, 2015, 2:19 pm
by Julian
What is a "symbolic link"`?
My goal ist to share the same media-folder for two different Joomla-installations. Which way would you suggest?

All the best, Julian!

Re: Synchronizing two folders

Posted: May 18th, 2015, 2:51 pm
by Admin
First site (master) will have usual media folder.
Second site (slave) should have a symbolic link (symlink) named as this folder and pointed to folder of master, so actually both sites will use same folder and same files.

Symbolic link is a kind of Shortcut in Windows.

You can ask your hosting support to create a symlink.

Re: Synchronizing two folders

Posted: June 8th, 2015, 2:38 pm
by Julian
Ok, I have done it with the symlink and it works perfect!
Thanks for this solution.

All the best, Julian!