Editing PostgreSQL/MediaWiki
From Bibliotheca Anonoma
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
PostgreSQL | PostgreSQL is used as our database for a number of reasons, from stability to compatibility with other apps to support for JSONB values. | ||
However, it is clearly not the most popular choice of database for Mediawiki, so we do make some workarounds to support this unique use case. These mods are noted below. | |||
=== PostgreSQL with UNIX Sockets === | === PostgreSQL with UNIX Sockets === | ||
Line 62: | Line 57: | ||
Use [[mediawikiwiki:Manual:DumpBackup.php|DumpBackup.php]] to create a full XML dump of all your wikipages and their edit history. SQL backups cannot be used in this transfer since, clearly PostgreSQL is incompatible with MySQL. However, XML dumps were designed to database independent with this in mind. | Use [[mediawikiwiki:Manual:DumpBackup.php|DumpBackup.php]] to create a full XML dump of all your wikipages and their edit history. SQL backups cannot be used in this transfer since, clearly PostgreSQL is incompatible with MySQL. However, XML dumps were designed to database independent with this in mind. | ||
As for your images, if you leave them in images/ (or wherever you specified in {{ic|LocalSettings.php}}) after importing the XML backup in the next step, all the images should still work. | |||
=== Move to MySQL === | === Move to MySQL === | ||
Line 75: | Line 68: | ||
# But after the MySQL database is initialized, move only the MySQL specific settings from the downloaded {{ic|LocalSettings.php}} setup gives you, to overwrite the PostgreSQL settings in {{ic|LocalSettings.php.bak}}. | # But after the MySQL database is initialized, move only the MySQL specific settings from the downloaded {{ic|LocalSettings.php}} setup gives you, to overwrite the PostgreSQL settings in {{ic|LocalSettings.php.bak}}. | ||
# Once the MySQL settings are moved in, rename {{ic|LocalSettings.php.bak}} to {{ic|LocalSettings.php}}. | # Once the MySQL settings are moved in, rename {{ic|LocalSettings.php.bak}} to {{ic|LocalSettings.php}}. | ||
# Now, restore your [[mediawikiwiki:Manual:Restoring_a_wiki_from_backup#From_an_XML_dump|XML Dump]], and make sure to regenerate RecentChanges as stated there. | # Now, restore your [[mediawikiwiki:Manual:Restoring_a_wiki_from_backup#From_an_XML_dump|XML Dump]], and make sure to regenerate RecentChanges as stated there. | ||
# Finally, to make sure your extensions work, [[mediawikiwiki:Manual:Update.php#From_the_command_line|update your database.]] | # Finally, to make sure your extensions work, [[mediawikiwiki:Manual:Update.php#From_the_command_line|update your database.]] | ||