Migrating Moodle site

Migrating Moodle site

Rebi Bajracharya發表於
Number of replies: 8

Hi all,

I wanted to migrate current site to another server. I have uploaded all files and configure database. And also define folder path in data root. Still I get error that " dataroot is not configured properly, directory does not exist or is not accessible! Exiting." as below. Anyone's help is highly appreciated. Please help, I have been hanging on this error since many days. Thanks in advance.




評比平均分數: -
In reply to Rebi Bajracharya

Re: Migrating Moodle site

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
You didn't give any detail about how you migrated the files area. So...
- wherever you moved the files to, check $CFG->dataroot in config.php definitely points to that location
- check the permission of that directory, all subdirectories and files to make sure that whatever user your web server runs as has read/write permission.

That's the basics.
評比平均分數:Useful (1)
In reply to Howard Miller

Re: Migrating Moodle site

Rebi Bajracharya發表於

Hi Howard Miller, 

Thank you for your response. Actually I am a new to this. So I downloaded files from old server and uploaded into new one. I went through few documentation, and I came to know about config.php file, also I have uploaded moodledata folder. I am not sure, what mistake I have done.  Please let me know, if I need to explain anything else. Sorry for my ignorance. 

Thanks in advance.






In reply to Rebi Bajracharya

Re: Migrating Moodle site

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
I don't know what "few documentation" you referred. This one is well-tested: https://docs.moodle.org/en/Moodle_migration.

Compare you notes with the documentation carefully, you'll find the answer yourself. If not give details of your operating system and other support software like the web server, the database server, PHP, ...

P.S. This is an "Installing and upgrading help" question. A Moodle migration is nothing more than a https://docs.moodle.org/en/Site_backup and https://docs.moodle.org/en/Site_restore. Be prepared that the moderator will shift this from the "General help" forum.
評比平均分數:Useful (2)
In reply to Visvanath Ratnaweera

Re: Migrating Moodle site

Rebi Bajracharya發表於
Hi Visvanath, I really appreciate your response. But I have gone through the documentation that you have provided and I have did exactly the same. I just can't figure it out, what's missing. Is there any connection with OS, database server etc?
Link: http://kevinm203.sg-host.com/
In reply to Rebi Bajracharya

Re: Migrating Moodle site

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
Well, Yes! "Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting." talks about a missing or a not accessible directory, which is at the OS level https://moodle.org/mod/forum/discuss.php?d=436504#p1756566. That is why it is good idea to give details of the OS and other system software up front.

BTW, if that OS starts with a 'W', I'll be gone.
大笑
In reply to Rebi Bajracharya

Re: Migrating Moodle site

Ken Task發表於
Particularly helpful Moodlers的相片

Server appears to be an nginx with no certificate.

Stronlgy suggest running under https:// and not http://.   So get nginx to respond to https://yourdomain/test.html that you create first, with a valid cert (no broken lock in browser) and then work on moodle migration.

This doc: https://docs.moodle.org/39/en/Nginx

There is a section on dataroot in above link.

'SoS', Ken