Synchronizing two folders

Multisites manager and data sharing solution for Joomla!
Forum rules
This forum is not for any support questions/issues/features. Please use Support Center for such requests.
Post Reply
Julian
Newbie
Newbie
Posts: 5
Joined: March 15th, 2015, 10:45 pm

Synchronizing two folders

Post 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!
Julian
Newbie
Newbie
Posts: 5
Joined: March 15th, 2015, 10:45 pm

Re: Synchronizing two folders

Post 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!
User avatar
Admin
Site Admin
Site Admin
Posts: 1064
Joined: October 21st, 2008, 6:39 pm
Name: Administrator
Browser: Chrome

Re: Synchronizing two folders

Post by Admin »

Actually yes, but better just use a symbolic link.
Usual redirect won't help if the code checks for physical file presence.
Julian
Newbie
Newbie
Posts: 5
Joined: March 15th, 2015, 10:45 pm

Re: Synchronizing two folders

Post 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!
User avatar
Admin
Site Admin
Site Admin
Posts: 1064
Joined: October 21st, 2008, 6:39 pm
Name: Administrator
Browser: Chrome

Re: Synchronizing two folders

Post 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.
Julian
Newbie
Newbie
Posts: 5
Joined: March 15th, 2015, 10:45 pm

Re: Synchronizing two folders

Post by Julian »

Ok, I have done it with the symlink and it works perfect!
Thanks for this solution.

All the best, Julian!
Post Reply