Will this work?

Will this work?

by Brian Evans -
Number of replies: 2

I have been running 2.8.2+ but due to an apparently serious mistake on my part I have lost access to my server via http.  I still have access via SSH and FTP and have managed to back up my entire database, my moodledata directory, plus everything else I can think of that can't be replaced.

My question is: Can I rebuild my server, upload my old database, upload my old moodledata, then reinstall moodle and have everything work?

2.8.2 doesn't seem to be available anymore so I will likely have to use 2.8.6.  Will this be a problem?  What about moving directly to 2.9?

Thanks for any insights.

Average of ratings: -
In reply to Brian Evans

Re: Will this work?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The answer should be yes. What you are doing is essentially https://docs.moodle.org/28/en/Moodle_migration

Probably best to start with exactly the same version of the Moodle code if you can. One less thing to go wrong. Once everything is working again, then upgrading would be recommended.

If you look at the Moodle download URL, it should be obvious how to download any previous version.

In reply to Brian Evans

Re: Will this work?

by Ken Task -
Picture of Particularly helpful Moodlers

+1 to Tim's suggestions, but ...

if you are going to 'rebuild'  Moodle on the same server, won't you run into the same issue with the web server issue ('lost access to my server via http')?

Depending upon what 'apparently serious mistake' means, it might be less work fixing access to the web server.   Granted, these forums are about Moodle, but a web server is required to run a Moodle.

Since you've mentioned ssh access, that's a clue that server is Linux but you've not disclosed what flavor of linux and if it's on a shared host or dedicated (have root access?).

Not being able to access a web server could have many causes, but some suggestions:

the web server service (daemon) isn't running

- via ssh as root user: ps aux |grep httpd or |grep apache2 (difference there is flavor of linux)

change to configuration created an error and web server cannot launch

depending upon linux flavor, apache error logs should give a clue.   Log *might be*

- in /var/log/httpd/error_log and a 'tail -n 50 /var/log/httpd/error_log' command will render the last 50 lines of the web server error log and thus give a clue.

change to firewall (port 80) no longer open.

curl -I http://yoursite/ will check.

'spirit of sharing', Ken

Average of ratings: Useful (1)