Jump to content

Manual talk:Restoring a wiki from backup

Add topic
From mediawiki.org

Section: Import the database backup

[edit]

please check the import of DB (restore of DB)

  • mysqldump --default-character-set=binary --user=foobar --password=barbaz wikidb > dbdump.txt
  • mysql --silent --local --password=barbaz newdb < dbdump.txt

should be with user? so:

  • mysql --user=foobar --silent --local --password=barbaz newdb < dbdump.txt

TiloWiki (talk) 01:17, 19 February 2013 (UTC)Reply

Section: Re-create the database, user and permissions

[edit]

Laudaka (talk) 16:30, 17 August 2014 (UTC)Reply

  • When trying to restore the wikidb with the mysql command I get this error:
ERROR 1142 (42000) at line 22: DROP command denied to user 'wikidb_user'@'localhost' for table 'mw_archive'
  • So to the list of permissions of our MySQL wikidb_user we need to add the DROP permission:
USE wikidb;
GRANT SELECT ON wikidb.* TO wikidb_user;
GRANT UPDATE ON wikidb.* TO wikidb_user;
GRANT INSERT ON wikidb.* TO wikidb_user;
GRANT DELETE ON wikidb.* TO wikidb_user;
GRANT DROP ON wikidb.* TO wikidb_user;       <===== ADDED

Laudaka (talk) 10:01, 9 September 2014 (UTC)Reply

  • Hmmmmm. I'm not so sure about the need for the DROP permission. Can someone with MySQL expertise have a look at it? The first time I got an ERROR 1142 the GRANT DROP command above solved it. For another wiki I restored I had to use the command line below. I don't know what to think of it. Please FIXME. Thanks in advance.
GRANT DROP ON wikiclubnix.* TO mediawiksoft@localhost;

All sections

[edit]
  • For the things the user has to fill in I consistently changed everything in wikidb wikidb_user wikidb_userpassword . Both in what has to be typed on the MySQL prompt (mysql) and what has to be typed on the ordinary command line (bash or cmd.exe)
  • I chose for wikifolder instead of wiki_folder because wikidb has been written as one word as well.
  • I would appreciate if someone could have a look if everything is OK. I'm an advanced user but by no means a professional :-) BTW Thanks for this versatile piece of open source software MediaWiki :-D

Laudaka (talk) 18:12, 17 August 2014 (UTC)Reply

List of placeholders proposed by Laudaka

[edit]
  • Directories AKA folder with files (in the filesystem):
wikifolder
wikifolder_backup
  • And this is in the MySQL/PostgresQL/SQLite database:
wikidb
wikidb_user
wikidb_userpassword

Manual:Restoring_a_wiki_from_backup#Frequent_problems

[edit]

This section seems obsolete because the phabricator:T37472 is closed and resolved. Mahabarata73 (talk) 17:16, 1 December 2024 (UTC)Reply