Trying to recover courses, users, etc. from different server backup

Trying to recover courses, users, etc. from different server backup

by RPG Education -
Number of replies: 3

Greetings,

I have been beating my head against this wall for a very long time, hopefully folks here can help me get this right.

Our site was running well on a godaddy shared hosting environment, but then couldn't upgrade, and short version of a long story, the shared hosting became completely unusable. The old site is gone, we have only the backed up data.

Someone (godaddy systems administrator screw up or a hacker, they can't figure out which) at some point deleted everything on the site, but fortunately we have earlier automatic backup snapshot tarballs.

We have setup a new dedicated (not shared) server, and downloaded the databases that were backed up before the shared site collapsed. We have hundreds of hours of coursework in this database.

The godaddy server was running 3.3.2 before it died.  I have the complete backups of the moodle html directory, and the mysql database. These are not exports, these are automated backup tarball snapshots. The new server is Ubuntu 16.04.5 LTS

I extracted the tarball onto the new server. Configured apache to read the dir, updated permissions, imported the database into a fresh mysql/mariadb database. And after some fiddling had the site up, except it is only a plain emply moodle site. ???

None of the users, coursework, etc. shows up in the moodle web interface, but SQL queries show the data is in the database, and I see the files on the server in the web directory.

Is there a howto that might be applicable to what I'm doing?

Or can some one help walk me through the correct steps for this type of use case situation for recovery?

I can setup whatever infrastructure is necessary to facilitate this the best.

I have tried this several different ways from just a plain extraction as one approach. Another approach was to create a clean install of 3.3.8 (build 20181019), and then trying to import through mysql < dbname.sql.

And a few other variants, but while I don't have trouble getting it into the database, I can't seem to get it show up in the web interface of Moodle,and only get the default install admin user.

I am happy to start from scratch again to import this data by whatever is the best means possible.

Thanks for any help!


Version summary:

Old shared godaddy Moodle version: 3.3.2

New server operating system: Ubuntu 16.04.5 LTS








Average of ratings: -
In reply to RPG Education

Re: Trying to recover courses, users, etc. from different server backup

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Fact 1. Three things are required for a Moodle to Moodle migration: https://docs.moodle.org/en/Moodle_migration. What you are trying to do is a Moodle migration, from the old server to the new one. Two things are _absolute must_, namely the database and the directory called moodledata. Missing Moodle code, in the directory what we call the moodle directory, can be redownloaded from the official Moodle repositories.

I don't have a clue what type of backups you are talking about. Without the two "must" things above, you are lost. If you don't believe me run an advanced search in the form to find sad threads like https://moodle.org/mod/forum/discuss.php?d=325311#p1307241.

Fact 2. Doesn't Godaddy offer full site (Plesk of whatever) backup from the past as snap-shots? They just have to reset your site to a back up before the disaster.

Fact 3: "Go Daddy! (Where to?)" https://moodle.org/mod/forum/discuss.php?d=193106
sad
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Trying to recover courses, users, etc. from different server backup

by RPG Education -

Thanks!

So I was so very close, and that link helped clarify what I was guessing at previously.

The key I needed was to recreate the data dir as it was on the old server, rather than changing the config.php to have it be in /var/www/moodledata, I just created a directory structure on my new dev server that was the same directory structure as the old server. Godaddy had it (oddly) as thus:

/home/<username>/public_html/rpgtrain/training/data/

Then chown'd it, and voila! Up and running in full on the dev server.

Now I can try tweaking it to get it to be in the directory structure desired for the new server (I hope). Then perform the many upgrades needed. And then finally migrate it to the new production server.

Phew!

Thanks again!

In reply to RPG Education

Re: Trying to recover courses, users, etc. from different server backup

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Congrats! You were lucky. Many who try to recover in panic do more damage.
sad

I didn't get exactly where the site is now running, in the old server or the new server? Whichever take a proper https://docs.moodle.org/en/Site_backup immediately and download it to your local computer. Ideally, you should test the quality of that backup by a https://docs.moodle.org/en/Site_restore somewhere else.