Backups/cs

From Miraheze Meta, Miraheze's central coordination wiki
This page is a translated version of the page Backups and the translation is 4% complete.
Backups

Peace of mind is priceless. For that reason, Miraheze stores both internal and external backups of all wikis. Along with storing internal and external backups, we also post dumps of all public wikis every month on archive.org to allow users to download them monthly and to provide further peace of mind.

As such, Miraheze has a total of three types of backups which are taken. On top of this, users may generate their own backups, quickly and conveniently on demand using our DataDump tool.

Backup types

Miraheze takes three types of backups to ensure as much resiliency as possible.

  • Internal backups are backups kept on hand which the Site Reliability Engineering team can use to bring the entire site quickly up in the event of a catastrophic failure. These backups include full database dumps, which include user account information and CheckUser information. See the schedule below for more information.
  • External backups are automatic backups kept on servers controlled by us but on a different host and in a different country. This is done to ensure that a failure on one host or in the power grid of one country, etc., doesn't cause extended downtime or data loss to our users. These types of backups include critical parts of our infrastructure such as the databases of all wikis, private Git repository data, Phorge configurations, and much more. See the schedule below for more information.
  • Public backups are XML backups which we upload every month to archive.org of all public wikis. We do this to make sure we have a reliable backup of all wikis on an external site, along with to ensure users have peace of mind by seeing a readily available backup for usage by us/them.

General backup schedules

Up to date as of 12 January 2023.

Miraheze automatically runs the following backups for disaster recovery purposes:

Internal/External
  • Weekly: Private Git repository for configuration management secrets and SSL keys.
  • Weekly: mhglobal (CreateWiki, ManageWiki, global tables) and reports (TSPortal) databases.
  • Fortnightly: All other databases in SQL format for all wikis and other services.
  • Fortnightly: Phorge images and database.
  • Monthly: matomo database.
  • Monthly: XML dump of all private wikis.
  • 3-monthly: Full XML dumps of all wikis, including private wikis.
  • On demand: XML backups of all wikis scheduled for deletion.
  • Not currently ran: Static images for all wikis.
Public
  • Monthly: All public wikis; XML dumps uploaded to archive.org.

Manual backups

On top of our internal, external, and public backups, users may generate their own using different ways.

Users may upload their wiki dumps to Archive.org for a further level of backup. Please include "miraheze" in the list of subject tabs.

DataDump (recommended)

DataDump je rozšíření vyvinuté Miraheze, které umožňuje správcům wiki snadno a rychle vytvářet výpisy z databáze. Správci mohou vytvářet XML zálohy (které obsahují všechny stránky a revize) a zálohy nastavení ManageWiki. Je to nejrychlejší, nejjednodušší a nejpohodlnější řešení, ale v současné době jím nelze zálohovat soubory.

To use DataDump, go to Special:DataDump on your wiki and select what backup you want. Once you submit your request, your backups will be generated. Depending on the size of the wiki, it may take from a few seconds up to a few hours to generate a database dump.

DataDump API

DataDump offers an API module which lets users use DataDump via the command line. As yet, there are no scripts that make use of this.

Mediawiki Dump Generator

While we strongly recommend using DataDump, you may also generate a database dump and file dump using the Mediawiki Client Tools' Mediawiki Dump Generator Python 3 dumpgenerator script, (full instructions are at this link).

Example usage

dumpgenerator --xml --xmlrevisions --images https://WIKINAME.miraheze.org

Substitute WIKINAME with the wiki's subdomain.

The result will include an XML dump with full page history, a dump of all images and files along with associated descriptions and a siteinfo.json file containing information about features, such as the installed extensions and skins.

Private wikis

To dump a private wiki you will have to use a login that has at least read permission on the wiki.

dumpgenerator --xml --xmlrevisions --images -g=--user -g=USER -g=--pass -g=PASSWORD https://WIKINAME.miraheze.org

Substitute WIKINAME with the wiki's subdomain, USER with the login name and PASSWORD with an actual password.

See also

  • Bacula (the former backup system)