Topic on Project:Support desk

Jump to navigation Jump to search
Pepsisformosa (talkcontribs)

I've been using a raspberry pi to host a private wiki since 2014 (MediaWiki 1.19.20+dfsg-2.3), and recently the sqlite database file outgrew the veracrypt container on which it was stored. Fortunately, I made regular backups of the database file, but while the wiki works for a short period after swapping out the database file for a backup version, within a day or so it will start returning HTTP 500 errors. The database checker claims that is not corrupted, yet the problem persists until I swap out the database for a fresh copy (which then succumbs to the same fate).

I then tried a fresh install (MediaWiki 1.27.5) on a separate pi, but the newer version does not seem to recognize the old database file. I've tried updating the database file as well as the entire media wiki installation on the first pi, and these failed.

What would be the easiest way to get it running again?

Ciencia Al Poder (talkcontribs)

Take a look at Manual:SQLite for requirements and installation. Try a new installation first to see if the installer detects support for sqlite database.

Pepsisformosa (talkcontribs)

Thanks for taking the time to help.

I did a fresh install, and it detected support for sqlite database and works fine with the brand new database. The problem comes when I try to replace the new database with the old database (1.19.20+dfsg-2.3) that actually has all my data in it. When I do that and try to visit the wiki, I get this message: "A database query error has occurred. This may indicate a bug in the software."

When I try to update the table by visiting mediawiki/mw-config/ and running through the update process, it fails with this message:


Turning off Content Handler DB fields for this part of upgrade.

...have ss_active_users field in site_stats table.

...ss_active_users user count set...

...have ipb_allow_usertalk field in ipblocks table.

Adding initial indexes ...

An error occurred:

A database query error has occurred.

Query: CREATE TABLE archive_tmp (

ar_id NOT NULL PRIMARY KEY clustered IDENTITY,

ar_namespace INTEGER NOT NULL DEFAULT 0,

ar_title NVARCHAR(255) NOT NULL DEFAULT '',

ar_text NVARCHAR(MAX) NOT NULL,

ar_comment NVARCHAR(255) NOT NULL,

ar_user INTEGER NULL REFERENCES [user](user_id) ON DELETE SET NULL,

ar_user_text NVARCHAR(255) NOT NULL,

ar_timestamp TEXT NOT NULL DEFAULT GETDATE(),

ar_minor_edit BIT NOT NULL DEFAULT 0,

ar_flags NVARCHAR(255) NOT NULL,

ar_rev_id INTEGER,

ar_text_id INTEGER,

ar_deleted BIT NOT NULL DEFAULT 0,

ar_len INTEGER DEFAULT NULL,

ar_page_id INTEGER NULL,

ar_parent_id INTEGER NULL

)

Function: DatabaseBase::sourceFile( /usr/share/mediawiki/maintenance/sqlite/archives/initial-indexes.sql )

Error: 1 near "clustered": syntax error

Backtrace:

#0 /usr/share/mediawiki/includes/db/Database.php(901): DatabaseBase->reportQueryError('near "clustered...', 1, 'CREATE TABLE ar...', 'DatabaseBase::s...', false)

#1 /usr/share/mediawiki/includes/db/Database.php(3057): DatabaseBase->query('CREATE TABLE ar...', 'DatabaseBase::s...')

#2 /usr/share/mediawiki/includes/db/Database.php(2978): DatabaseBase->sourceStream(Resource id #16, false, false, 'DatabaseBase::s...', false)

#3 /usr/share/mediawiki/includes/installer/DatabaseUpdater.php(669): DatabaseBase->sourceFile('/usr/share/medi...')

#4 /usr/share/mediawiki/includes/installer/SqliteUpdater.php(168): DatabaseUpdater->applyPatch('/usr/share/medi...', false, 'Adding initial ...')

#5 /usr/share/mediawiki/includes/installer/DatabaseUpdater.php(455): SqliteUpdater->sqliteInitialIndexes()

#6 /usr/share/mediawiki/includes/installer/DatabaseUpdater.php(416): DatabaseUpdater->runUpdates(Array, false)

#7 /usr/share/mediawiki/includes/installer/DatabaseInstaller.php(307): DatabaseUpdater->doUpdates()

#8 /usr/share/mediawiki/includes/installer/WebInstallerUpgrade.php(65): DatabaseInstaller->doUpgrade()

#9 /usr/share/mediawiki/includes/installer/WebInstaller.php(279): WebInstallerUpgrade->execute()

#10 /usr/share/mediawiki/mw-config/index.php(81): WebInstaller->execute(Array)

#11 /usr/share/mediawiki/mw-config/index.php(39): wfInstallerMain()

#12 {main}

Purging caches...done.

Ciencia Al Poder (talkcontribs)
Reply to "wiki recovery"