Migrating Moodle site

Migrating Moodle site

Rebi Bajracharya -
回帖数: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.




回复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.
回复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.






回复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.
回复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/
回复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.
大笑
回复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