Recently the wiki I administer in some sense has "crashed" due to a database that seems to be completely lost. Just the database, not the MediaWiki installation, extensions or media. Unfortunately, I didn't make any backups relying on the hosting service capabilities, and the large wiki was full on unique content available worldwide now not being accessible after about ten years of stable work. However, there is still a private mirror of the wiki made about a year or two ago that was used as an experimental playground from time to time. Thus both wikis have diverged history. One more thing that can play the crucial role: I have a Git clone of the wiki created with git-remote-mediawiki a month ago.
Actually I would really like to restore the database, and I have some scenario that probably might help restore at least a partial instance. Here is how I think it could work:
- Clone the private experimental database so let the only survived database be untouched.
- In the cloned database, if possible, trim the N last changes to drop all diverged changes (comparing to the lost live database). Is such trimming possible in MediaWiki? (Maybe some of the maintenance scripts?) How big should N be? Actually have no idea yet, probably a sort of "binary search" just reviewing both wikis. Maybe it should be even up to the very first revision if necessary.
- Clone the git-mediawiki backup to keep the original safe, and change the origin in
.git/configso let it point to the private mirror wiki.
- Push the changes from the git repo to the origin in hope it would restore most pages. As far as I remember, the remote helper does not sync templates, talk pages, user pages and so on. Unfortunately, they seem to be completely unrestorable. Most templates might be restored by memory more or less.
Would it be possible to "trim" the last N changes in MediaWiki to drop the changes in the private mirror in order to restore the pages from the git backup?