Running parallel databases

Running parallel databases

by Russell Thomson -
Number of replies: 6

I want to create a parallel Moodle database so that I can leave the original running while I create a second in which I can redesign the architecture of my site and slowly copy everything across.


In the root directory I have

Directory: moodledata

Directory: www (this contains Wordpress and a directory: education, which contains Moodle)

And the files:

.bash_logout

.bash_profile

.bashrc

.htaccess

 

I have created another directory in www for the new Moodle directories and files and in the root directory I have created moodledatalearning for the new Moodle data directory.

 

Do the files .bash_logout, .bash_profile, .bashrc and .htaccess belong to Moodle? If so, I suppose I have to put the new moodledatalearning into a subdirectory (or else it will interfere with the original Moodle installation) and link this to the Moodle application.


Am I right in assuming that if I create a subdirectory for the new Moodle data, I link this during the installation when I have to specify the web address and directories?


Am doing anything that might interfere with the running of the original Moodle installation?

 

Regards 


Average of ratings: -
In reply to Russell Thomson

Re: Running parallel databases

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So you are actually describing setting up a whole new site, not a new database, right?

You just need to keep everything separate including creating a new database.  It sounds like you are on a host - the .htaccess file contains the php settings for your original moodle site.  This should not be affected by the second site.  Not sure what the other files are but I suspect something from your host.

In reply to Emma Richardson

Re: Running parallel databases

by Russell Thomson -

Thanks Emma,

Yes, I'm setting up a whole new site: new application, new database and new moodledata. I was worried that when I install the new site that it might over write the files: .bash_logout, .bash_profile, .bashrc and .htaccess in the root directory and damage the existing site, that's why I want to know if I have to create a subdirectory away from the existing moodledata directory in root. It's not a problem if all I have to do name the directories when I specify the web address and directories during installation.

Regards



In reply to Russell Thomson

Re: Running parallel databases

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

But you do not want to overwrite those files, especially the .htaccess as that is necessary to your site/s.  Just keep it all in its own separate folders and you will be fine.

In reply to Russell Thomson

Re: Running parallel databases

by Ken Task -
Picture of Particularly helpful Moodlers

The following hidden files (you are using Linux) should not be copied to the new moodle code directory you will create for your manual migration process.

.bash_logout

.bash_profile

.bashrc

They are for settings related to bash shell and evidently your provider had made the moodle code directory a 'home' directory for your ssh/shell account at one time.    That's not normal ... normally, one finds those hidden bash shell config files in a users 'home' directory - something like ... /customers/[customerlogin]/

The .htaccess file should also NOT be copied to new moodle code without inspection.   That is a file used by Apache and could have settings for php and other settings which you don't want to apply to the new code directory.

Where to place the new moodle code directory depends upon where/how provider as setup your customer space.  If you are working on a standalone - not shared - system and depending upon 'flavor' of Linux, apache root could be something like /var/www/   The document root could be /var/www/html/ and anything in there, apache will be able to serve out.   So your original moodle code could be 'scattered' in there - or it could be in a 'moodle' directory.   Only way to know is to be able to see the config file for apache - which you may/may not be able to do, depending.

Just keep in mind that the 2nd instance of Moodle needs it's own code directory, it's own data directory, and it's own database.  And the 2nd instance code directory and data directory have to be able to be seen by apache and the data directory has to also have write access by the apache server.

'spirit of sharing', Ken

In reply to Ken Task

Re: Running parallel databases

by Albert Ramsbottom -

Yes just keep those files and stick em in the new moodle2 folder and take a peek at the .htaccess file to see if anything needs changing

Albert

Cheers