Mailing List Archive

Restoring a mediawiki site
Hello,

I have tried to restore one of my wiki sites for testing, because I've always learnt that a non-tested backup is a useless backup.

I have exported my database named pascal_wikidb using phpmyadmin on my host site and obtained an sql file.
Then I have tried to import this sql file on another database (on the same host site) named pascal_dbtest. I have had hard time doing it because the import function of phpmyadmin doesn't work well with lynx, but that is another story. Using Firefox, I managed to do it still with an error message (I don't remember this message and I cannot reproduce easily this operation); so I wasn't sure my restoration was complete.
I then imported pascal_dbtest and it sounded complete when looking at the sql file, except that there are only 5 "ALTER TABLE" in it, instaed of a few dozens in the file exported from pascal_wikidb. Anyway it's hard to compare at a manual glance.

So I changed the LocalSettings.php of my wiki site to have it pointing on pascal_dbtest instead of pascal_wikidb :

$wgDBname = "pascal_dbtest";
$wgDBuser = "pascal_testwiki";
$wgDBpassword = "Undiscloed_password"

I opened my wiki with the normal URL, I managed to log in, but I couldn't modify any page, when I try I get :
"Alert: HTTP/1.1 500 Internal Server Error"
then (this is a translation back to english, sorry)
«
A database request error occured. It could have been caused by something wrong in the software.
[1cd8b80a4379c26549677281] 2020-07-13 17:30:10: Fatal erreur of type "DBQueryError"
»

Is there any procedure to follow to restore a wiki installation from a database backup?
Or is it likely to be caused by a corruption in my database backup?

I precise that I almost eliminated the hypothesis of an error in the user's permissions on this database.

Thanks in advance for any answer

Regards

Pascal GRÉGIS


_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Restoring a mediawiki site [ In reply to ]
Hello!

To get a more detailed error message, please set

$wgShowSQLErrors = true;
$wgDebugDumpSql = true;
$wgShowExceptionDetails = true;
$wgShowDBErrorBacktrace = true;

in your `LocalSettings.php` file.
Did you run `maintenance/update.php` on you new wiki? Maybe it's just a schema change that needs to be applied.

Maybe these links are helpful:

- https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
- https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup
- https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script

Good luck,
Robert

Am Montag, den 13.07.2020, 19:43 +0200 schrieb Pascal GREGIS:

Hello,


I have tried to restore one of my wiki sites for testing, because I've always learnt that a non-tested backup is a useless backup.


I have exported my database named pascal_wikidb using phpmyadmin on my host site and obtained an sql file.

Then I have tried to import this sql file on another database (on the same host site) named pascal_dbtest. I have had hard time doing it because the import function of phpmyadmin doesn't work well with lynx, but that is another story. Using Firefox, I managed to do it still with an error message (I don't remember this message and I cannot reproduce easily this operation); so I wasn't sure my restoration was complete.

I then imported pascal_dbtest and it sounded complete when looking at the sql file, except that there are only 5 "ALTER TABLE" in it, instaed of a few dozens in the file exported from pascal_wikidb. Anyway it's hard to compare at a manual glance.


So I changed the LocalSettings.php of my wiki site to have it pointing on pascal_dbtest instead of pascal_wikidb :


$wgDBname = "pascal_dbtest";

$wgDBuser = "pascal_testwiki";

$wgDBpassword = "Undiscloed_password"


I opened my wiki with the normal URL, I managed to log in, but I couldn't modify any page, when I try I get :

"Alert: HTTP/1.1 500 Internal Server Error"

then (this is a translation back to english, sorry)

«

A database request error occured. It could have been caused by something wrong in the software.

[1cd8b80a4379c26549677281] 2020-07-13 17:30:10: Fatal erreur of type "DBQueryError"

»


Is there any procedure to follow to restore a wiki installation from a database backup?

Or is it likely to be caused by a corruption in my database backup?


I precise that I almost eliminated the hypothesis of an error in the user's permissions on this database.


Thanks in advance for any answer


Regards


Pascal GRÉGIS



_______________________________________________

MediaWiki-l mailing list

To unsubscribe, go to:

https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


--

Robert Vogel Team Lead Product and Software Development Hallo Welt! GmbH Postfach 11 02 09?93015 Regensburg Germany Telefon: +49 (0) 941 - 660 80-0 Fax: +49 (0) 941 - 660 80-189 hallowelt.com vogel@hallowelt.com Sitz: Regensburg Amtsgericht: Regensburg Handelsregister: HRB 10467 E.USt.Nr.: DE 253050833 Geschäftsführer: Anja Ebersbach, Markus Glaser, Dr. Richard Heigl Besuchen Sie unsere aktuellen BlueSpice-Webinare: https://de.bluespice.com/webinar
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Restoring a mediawiki site [ In reply to ]
Hello,

Thank you for your suggestions, and sorry for the delay, I haven't been able to test earlier.

First I have read the doc pages you sent me, the 2 first : How_to_backup_a_wiki and How_to_restore_a_wiki_backup, and my attention has been focused on a few points :
- on the backup doc page I read :
"Optionally check Add DROP TABLE to delete existing references when importing."
and on the restore doc page :
"Depending on timeout settings and the size of the SQL file, it may take multiple attempts to import everything. Failure to complete the import may leave the database in an inconsistent state, e.g. with missing revisions."
I'm nnot sure to understand, if my restoration is incomplete due to timeout, my second attempt shouldn't wipe the tables already restored ? The problem being that the restoration process doesn't seem to be fully reentrant, that's why my second attempt failed : a primary key already set or something like that.
- on the backup doc page :
"Make sure all items under Export are highlighted, and make sure Structure is highlighted [...] Make sure Data is checked."
things are rendered such differently with lynx that I'm not sure of the relevance of what follows :
I have at some places a 3-choice-box with the alternatives : "structure, "data", "data and structure"
the 1st of these boxes, which is placed after a header "export table", "data" is checked
for the others, wich are placed after headers like "opendocument text" ot "LaTex", "data and structure" is checked
I really don't think there is any problem with it, because my resulting sql file seems to contain all the tables and their content, bu should I chekc "data and structure" in the first box ?
- I discovered the possibility of XML dumps, but some pages insisted on the fact that they are not backups, do you confirm that it's not what I'm looking for ?

Then I enabled the 4 variables you gave me in LocalSettings.php.
I logged in on my wiki, opened a page and clicked on "history", and I got the followin error :
«
An error occured ...

[33ddc7b2dc654e161e321974]
/andrapal/index.php?title=R%C3%A9cit_de_l%27%C3%A9pop%C3%A9e_des_Hilhio
te&action=history DBQueryError from line 1054 of
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/libs/
rdbms/database/Database.php: A database query error has occurred. Did
you forget to run your application's database schema updater after
upgrading?
Query: SELECT
rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev
_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_con
tent_format,rev_content_model,user_name,(SELECT GROUP_CONCAT(ct_tag
SEPARATOR ',') FROM `andrapalchange_tag` WHERE ct_rev_id=rev_id ) AS
`ts_tags` FROM `andrapalrevision` FORCE INDEX (page_timestamp) LEFT
JOIN `andrapaluser` ON ((rev_user != 0) AND (user_id = rev_user)) WHERE
rev_page = '2' ORDER BY rev_timestamp DESC LIMIT 51
Function: IndexPager::buildQueryInfo (history page unfiltered)
Error: 1176 Key 'page_timestamp' doesn't exist in table
'andrapalrevision' (sql.lautre.net)

Backtrace:

#0
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/libs/
rdbms/database/Database.php(912): Database->reportQueryError(string,
integer, string, string, boolean)
#1
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/libs/
rdbms/database/Database.php(1254): Database->query(string, string)
#2
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/pager
/IndexPager.php(365): Database->select(array, array, array, string,
array, array)
#3
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/pager
/IndexPager.php(222): IndexPager->reallyDoQuery(string, integer,
boolean)
#4
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/pager
/IndexPager.php(605): IndexPager->doQuery()
#5
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/pager
/ReverseChronologicalPager.php(35): IndexPager->isNavigationBarShown()
#6
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/actio
ns/HistoryAction.php(216):
ReverseChronologicalPager->getNavigationBar()
#7
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/actio
ns/FormlessAction.php(43): HistoryAction->onView()
#8
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/Media
Wiki.php(495): FormlessAction->show()
#9
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/Media
Wiki.php(289): MediaWiki->performAction(Article, Title)
#10
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/Media
Wiki.php(851): MediaWiki->performRequest()
#11
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/includes/Media
Wiki.php(512): MediaWiki->main()
#12
/var/www/alternc/p/pascal/www/pascal.lautre.net/andrapal/index.php(43):
MediaWiki->run()
#13 {main}
»

This gave me the idea to go look in an export of my test database (the one who fails, on which I had restored), if andrapalrevision existed and if the key page_timestamp existed. I discovered that page_timestamp was in the 261 missing ALTER TABLE (which are in the primary database but not in the text database). So I guess the restoration is incomplete, maybe only these ALTER TABLE are missing, taht would be why the pages are ok but the history is corrupt.
Halas I wasn't able to execute by hand these ALTER TABLE requests. I isolated them in a file, and imported that file, but I got, after a very long time processing :
«
Error

SQL Request:
ALTER TABLE `andrapalexternallinks`
ADD PRIMARY KEY (`el_id`), ADD KEY `el_from` (`el_from`,`el_to`(40)), ADD KEY `el_to` (`el_to`(60),`el_from`), ADD KEY `el_index` (`el_index`(60));

MYSQL replied: Documentation
#1062 - Duplicate entry '1' for key 'PRIMARY'
»
I precise that this request is the first of the 261 requests in my file.

Well, I hope I wasn't too long. If you have any answers on this issue, I'm all ears opened.

Regards

Pascal

Robert Vogel a écrit, le mardi 14 juillet 2020 à 05:59:36 :
> Hello!
>
> To get a more detailed error message, please set
>
> $wgShowSQLErrors = true;
> $wgDebugDumpSql = true;
> $wgShowExceptionDetails = true;
> $wgShowDBErrorBacktrace = true;
>
> in your `LocalSettings.php` file.
> Did you run `maintenance/update.php` on you new wiki? Maybe it's just a schema change that needs to be applied.
>
> Maybe these links are helpful:
>
> - https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
> - https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup
> - https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
>
> Good luck,
> Robert
>
> Am Montag, den 13.07.2020, 19:43 +0200 schrieb Pascal GREGIS:
>
> Hello,
>
>
> I have tried to restore one of my wiki sites for testing, because I've always learnt that a non-tested backup is a useless backup.
>
>
> I have exported my database named pascal_wikidb using phpmyadmin on my host site and obtained an sql file.
>
> Then I have tried to import this sql file on another database (on the same host site) named pascal_dbtest. I have had hard time doing it because the import function of phpmyadmin doesn't work well with lynx, but that is another story. Using Firefox, I managed to do it still with an error message (I don't remember this message and I cannot reproduce easily this operation); so I wasn't sure my restoration was complete.
>
> I then imported pascal_dbtest and it sounded complete when looking at the sql file, except that there are only 5 "ALTER TABLE" in it, instaed of a few dozens in the file exported from pascal_wikidb. Anyway it's hard to compare at a manual glance.
>
>
> So I changed the LocalSettings.php of my wiki site to have it pointing on pascal_dbtest instead of pascal_wikidb :
>
>
> $wgDBname = "pascal_dbtest";
>
> $wgDBuser = "pascal_testwiki";
>
> $wgDBpassword = "Undiscloed_password"
>
>
> I opened my wiki with the normal URL, I managed to log in, but I couldn't modify any page, when I try I get :
>
> "Alert: HTTP/1.1 500 Internal Server Error"
>
> then (this is a translation back to english, sorry)
>
> «
>
> A database request error occured. It could have been caused by something wrong in the software.
>
> [1cd8b80a4379c26549677281] 2020-07-13 17:30:10: Fatal erreur of type "DBQueryError"
>
> »
>
>
> Is there any procedure to follow to restore a wiki installation from a database backup?
>
> Or is it likely to be caused by a corruption in my database backup?
>
>
> I precise that I almost eliminated the hypothesis of an error in the user's permissions on this database.
>
>
> Thanks in advance for any answer
>
>
> Regards
>
>
> Pascal GRÉGIS
>
>
>
> _______________________________________________
>
> MediaWiki-l mailing list
>
> To unsubscribe, go to:
>
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
> --
>
> Robert Vogel Team Lead Product and Software Development Hallo Welt! GmbH Postfach 11 02 09?93015 Regensburg Germany Telefon: +49 (0) 941 - 660 80-0 Fax: +49 (0) 941 - 660 80-189 hallowelt.com vogel@hallowelt.com Sitz: Regensburg Amtsgericht: Regensburg Handelsregister: HRB 10467 E.USt.Nr.: DE 253050833 Geschäftsführer: Anja Ebersbach, Markus Glaser, Dr. Richard Heigl Besuchen Sie unsere aktuellen BlueSpice-Webinare: https://de.bluespice.com/webinar
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Restoring a mediawiki site [ In reply to ]
It sounds like there was some error during the import process, and your db
wasnt fully imported (at the very least an index was missing). Its also
possible that maybe the export didnt include indicies (i dont know what
phpmyadmin does by default. It might be optional)

If possible i would suggest using the mysql command line client to do the
import, and commandline mysqldump to make the backup.


Additionally dont forget for a complete backup you also need to backup
LocalSettings.php and the images subdirectory (and maybe extensions
subdirectory)

--
Brian
On Monday, July 13, 2020, Pascal GREGIS <grapos@free.fr> wrote:

> Hello,
>
> I have tried to restore one of my wiki sites for testing, because I've
> always learnt that a non-tested backup is a useless backup.
>
> I have exported my database named pascal_wikidb using phpmyadmin on my
> host site and obtained an sql file.
> Then I have tried to import this sql file on another database (on the same
> host site) named pascal_dbtest. I have had hard time doing it because the
> import function of phpmyadmin doesn't work well with lynx, but that is
> another story. Using Firefox, I managed to do it still with an error
> message (I don't remember this message and I cannot reproduce easily this
> operation); so I wasn't sure my restoration was complete.
> I then imported pascal_dbtest and it sounded complete when looking at the
> sql file, except that there are only 5 "ALTER TABLE" in it, instaed of a
> few dozens in the file exported from pascal_wikidb. Anyway it's hard to
> compare at a manual glance.
>
> So I changed the LocalSettings.php of my wiki site to have it pointing on
> pascal_dbtest instead of pascal_wikidb :
>
> $wgDBname = "pascal_dbtest";
> $wgDBuser = "pascal_testwiki";
> $wgDBpassword = "Undiscloed_password"
>
> I opened my wiki with the normal URL, I managed to log in, but I couldn't
> modify any page, when I try I get :
> "Alert: HTTP/1.1 500 Internal Server Error"
> then (this is a translation back to english, sorry)
> «
> A database request error occured. It could have been caused by something
> wrong in the software.
> [1cd8b80a4379c26549677281] 2020-07-13 17:30:10: Fatal erreur of type
> "DBQueryError"
> »
>
> Is there any procedure to follow to restore a wiki installation from a
> database backup?
> Or is it likely to be caused by a corruption in my database backup?
>
> I precise that I almost eliminated the hypothesis of an error in the
> user's permissions on this database.
>
> Thanks in advance for any answer
>
> Regards
>
> Pascal GRÉGIS
>
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Restoring a mediawiki site [ In reply to ]
Hi,

Tnaks Brian.
Unfortunately I don't have access to the server, only via http and ftp.
So I guess the best I could do in a first time would be to set up an Apache + MySQL installation on my computer to restore my wiki and test the restoration locally. I have been reluctant to do it until now because I'm not cumfortable with setting up Apache, I have some souvenirs of it being quite painful but hopefully my souvenirs have no reason to be.
If it comes to work and my restoration to be all right, I would be reassured to know that my backups are valid and complete and give me time to find a solution to the restoration part.
Just one thing, do you confirm that xml dumps are of no use for my backup / restore issue ?

And yes, I know there are some other elements to backup, already done for the LocalSettings, and to be done for images and extensions but it's not a big issue in my case, I have very few.

Regards

Pascal

Brian Wolff a écrit, le jeudi 30 juillet 2020 à 03:52:43 :
> It sounds like there was some error during the import process, and your db
> wasnt fully imported (at the very least an index was missing). Its also
> possible that maybe the export didnt include indicies (i dont know what
> phpmyadmin does by default. It might be optional)
>
> If possible i would suggest using the mysql command line client to do the
> import, and commandline mysqldump to make the backup.
>
>
> Additionally dont forget for a complete backup you also need to backup
> LocalSettings.php and the images subdirectory (and maybe extensions
> subdirectory)
>
> --
> Brian
> On Monday, July 13, 2020, Pascal GREGIS <grapos@free.fr> wrote:
>
> > Hello,
> >
> > I have tried to restore one of my wiki sites for testing, because I've
> > always learnt that a non-tested backup is a useless backup.
> >
> > I have exported my database named pascal_wikidb using phpmyadmin on my
> > host site and obtained an sql file.
> > Then I have tried to import this sql file on another database (on the same
> > host site) named pascal_dbtest. I have had hard time doing it because the
> > import function of phpmyadmin doesn't work well with lynx, but that is
> > another story. Using Firefox, I managed to do it still with an error
> > message (I don't remember this message and I cannot reproduce easily this
> > operation); so I wasn't sure my restoration was complete.
> > I then imported pascal_dbtest and it sounded complete when looking at the
> > sql file, except that there are only 5 "ALTER TABLE" in it, instaed of a
> > few dozens in the file exported from pascal_wikidb. Anyway it's hard to
> > compare at a manual glance.
> >
> > So I changed the LocalSettings.php of my wiki site to have it pointing on
> > pascal_dbtest instead of pascal_wikidb :
> >
> > $wgDBname = "pascal_dbtest";
> > $wgDBuser = "pascal_testwiki";
> > $wgDBpassword = "Undiscloed_password"
> >
> > I opened my wiki with the normal URL, I managed to log in, but I couldn't
> > modify any page, when I try I get :
> > "Alert: HTTP/1.1 500 Internal Server Error"
> > then (this is a translation back to english, sorry)
> > «
> > A database request error occured. It could have been caused by something
> > wrong in the software.
> > [1cd8b80a4379c26549677281] 2020-07-13 17:30:10: Fatal erreur of type
> > "DBQueryError"
> > »
> >
> > Is there any procedure to follow to restore a wiki installation from a
> > database backup?
> > Or is it likely to be caused by a corruption in my database backup?
> >
> > I precise that I almost eliminated the hypothesis of an error in the
> > user's permissions on this database.
> >
> > Thanks in advance for any answer
> >
> > Regards
> >
> > Pascal GRÉGIS
> >
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Restoring a mediawiki site [ In reply to ]
Pascal,

I suggest using MediaWiki Vagrant [1] as the simplest method for setting up
a local MediaWiki environment. It may be all new to you, but it should
"just work" and you'll save yourself lots of headaches trying to install
and manage things separately. Once you have MediaWiki Vagrant setup, you
should be able to load your database backup, LocalSettings.php, and images
so that you have a good working development environment.

[1] https://www.mediawiki.org/wiki/MediaWiki-Vagrant

~ Greg

eQuality Technology

*Let's work together*

https://equality-tech.com
follow us: https://twitter.com/eQualityTech
*creators of https://QualityBox.us <https://QualityBox.us> *


On Fri, Jul 31, 2020 at 2:18 PM Pascal GREGIS <grapos@free.fr> wrote:

> Hi,
>
> Tnaks Brian.
> Unfortunately I don't have access to the server, only via http and ftp.
> So I guess the best I could do in a first time would be to set up an
> Apache + MySQL installation on my computer to restore my wiki and test the
> restoration locally. I have been reluctant to do it until now because I'm
> not cumfortable with setting up Apache, I have some souvenirs of it being
> quite painful but hopefully my souvenirs have no reason to be.
> If it comes to work and my restoration to be all right, I would be
> reassured to know that my backups are valid and complete and give me time
> to find a solution to the restoration part.
> Just one thing, do you confirm that xml dumps are of no use for my backup
> / restore issue ?
>
> And yes, I know there are some other elements to backup, already done for
> the LocalSettings, and to be done for images and extensions but it's not a
> big issue in my case, I have very few.
>
> Regards
>
> Pascal
>
> Brian Wolff a écrit, le jeudi 30 juillet 2020 à 03:52:43 :
> > It sounds like there was some error during the import process, and your
> db
> > wasnt fully imported (at the very least an index was missing). Its also
> > possible that maybe the export didnt include indicies (i dont know what
> > phpmyadmin does by default. It might be optional)
> >
> > If possible i would suggest using the mysql command line client to do the
> > import, and commandline mysqldump to make the backup.
> >
> >
> > Additionally dont forget for a complete backup you also need to backup
> > LocalSettings.php and the images subdirectory (and maybe extensions
> > subdirectory)
> >
> > --
> > Brian
> > On Monday, July 13, 2020, Pascal GREGIS <grapos@free.fr> wrote:
> >
> > > Hello,
> > >
> > > I have tried to restore one of my wiki sites for testing, because I've
> > > always learnt that a non-tested backup is a useless backup.
> > >
> > > I have exported my database named pascal_wikidb using phpmyadmin on my
> > > host site and obtained an sql file.
> > > Then I have tried to import this sql file on another database (on the
> same
> > > host site) named pascal_dbtest. I have had hard time doing it because
> the
> > > import function of phpmyadmin doesn't work well with lynx, but that is
> > > another story. Using Firefox, I managed to do it still with an error
> > > message (I don't remember this message and I cannot reproduce easily
> this
> > > operation); so I wasn't sure my restoration was complete.
> > > I then imported pascal_dbtest and it sounded complete when looking at
> the
> > > sql file, except that there are only 5 "ALTER TABLE" in it, instaed of
> a
> > > few dozens in the file exported from pascal_wikidb. Anyway it's hard to
> > > compare at a manual glance.
> > >
> > > So I changed the LocalSettings.php of my wiki site to have it pointing
> on
> > > pascal_dbtest instead of pascal_wikidb :
> > >
> > > $wgDBname = "pascal_dbtest";
> > > $wgDBuser = "pascal_testwiki";
> > > $wgDBpassword = "Undiscloed_password"
> > >
> > > I opened my wiki with the normal URL, I managed to log in, but I
> couldn't
> > > modify any page, when I try I get :
> > > "Alert: HTTP/1.1 500 Internal Server Error"
> > > then (this is a translation back to english, sorry)
> > > «
> > > A database request error occured. It could have been caused by
> something
> > > wrong in the software.
> > > [1cd8b80a4379c26549677281] 2020-07-13 17:30:10: Fatal erreur of type
> > > "DBQueryError"
> > > »
> > >
> > > Is there any procedure to follow to restore a wiki installation from a
> > > database backup?
> > > Or is it likely to be caused by a corruption in my database backup?
> > >
> > > I precise that I almost eliminated the hypothesis of an error in the
> > > user's permissions on this database.
> > >
> > > Thanks in advance for any answer
> > >
> > > Regards
> > >
> > > Pascal GRÉGIS
> > >
> > >
> > > _______________________________________________
> > > MediaWiki-l mailing list
> > > To unsubscribe, go to:
> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> > >
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Re: Restoring a mediawiki site [ In reply to ]
Thank you Greg for the tip,

I'll try it as sonn as I'll have time again for this issue.

Regards

Pascal

eQuality Technology a écrit, le vendredi 31 juillet 2020 à 15:23:48 :
> Pascal,
>
> I suggest using MediaWiki Vagrant [1] as the simplest method for setting up
> a local MediaWiki environment. It may be all new to you, but it should
> "just work" and you'll save yourself lots of headaches trying to install
> and manage things separately. Once you have MediaWiki Vagrant setup, you
> should be able to load your database backup, LocalSettings.php, and images
> so that you have a good working development environment.
>
> [1] https://www.mediawiki.org/wiki/MediaWiki-Vagrant
>
> ~ Greg
>
> eQuality Technology
>
> *Let's work together*
>
> https://equality-tech.com
> follow us: https://twitter.com/eQualityTech
> *creators of https://QualityBox.us <https://QualityBox.us> *
>
>
> On Fri, Jul 31, 2020 at 2:18 PM Pascal GREGIS <grapos@free.fr> wrote:
>
> > Hi,
> >
> > Tnaks Brian.
> > Unfortunately I don't have access to the server, only via http and ftp.
> > So I guess the best I could do in a first time would be to set up an
> > Apache + MySQL installation on my computer to restore my wiki and test the
> > restoration locally. I have been reluctant to do it until now because I'm
> > not cumfortable with setting up Apache, I have some souvenirs of it being
> > quite painful but hopefully my souvenirs have no reason to be.
> > If it comes to work and my restoration to be all right, I would be
> > reassured to know that my backups are valid and complete and give me time
> > to find a solution to the restoration part.
> > Just one thing, do you confirm that xml dumps are of no use for my backup
> > / restore issue ?
> >
> > And yes, I know there are some other elements to backup, already done for
> > the LocalSettings, and to be done for images and extensions but it's not a
> > big issue in my case, I have very few.
> >
> > Regards
> >
> > Pascal
> >
> > Brian Wolff a écrit, le jeudi 30 juillet 2020 à 03:52:43 :
> > > It sounds like there was some error during the import process, and your
> > db
> > > wasnt fully imported (at the very least an index was missing). Its also
> > > possible that maybe the export didnt include indicies (i dont know what
> > > phpmyadmin does by default. It might be optional)
> > >
> > > If possible i would suggest using the mysql command line client to do the
> > > import, and commandline mysqldump to make the backup.
> > >
> > >
> > > Additionally dont forget for a complete backup you also need to backup
> > > LocalSettings.php and the images subdirectory (and maybe extensions
> > > subdirectory)
> > >
> > > --
> > > Brian
> > > On Monday, July 13, 2020, Pascal GREGIS <grapos@free.fr> wrote:
> > >
> > > > Hello,
> > > >
> > > > I have tried to restore one of my wiki sites for testing, because I've
> > > > always learnt that a non-tested backup is a useless backup.
> > > >
> > > > I have exported my database named pascal_wikidb using phpmyadmin on my
> > > > host site and obtained an sql file.
> > > > Then I have tried to import this sql file on another database (on the
> > same
> > > > host site) named pascal_dbtest. I have had hard time doing it because
> > the
> > > > import function of phpmyadmin doesn't work well with lynx, but that is
> > > > another story. Using Firefox, I managed to do it still with an error
> > > > message (I don't remember this message and I cannot reproduce easily
> > this
> > > > operation); so I wasn't sure my restoration was complete.
> > > > I then imported pascal_dbtest and it sounded complete when looking at
> > the
> > > > sql file, except that there are only 5 "ALTER TABLE" in it, instaed of
> > a
> > > > few dozens in the file exported from pascal_wikidb. Anyway it's hard to
> > > > compare at a manual glance.
> > > >
> > > > So I changed the LocalSettings.php of my wiki site to have it pointing
> > on
> > > > pascal_dbtest instead of pascal_wikidb :
> > > >
> > > > $wgDBname = "pascal_dbtest";
> > > > $wgDBuser = "pascal_testwiki";
> > > > $wgDBpassword = "Undiscloed_password"
> > > >
> > > > I opened my wiki with the normal URL, I managed to log in, but I
> > couldn't
> > > > modify any page, when I try I get :
> > > > "Alert: HTTP/1.1 500 Internal Server Error"
> > > > then (this is a translation back to english, sorry)
> > > > «
> > > > A database request error occured. It could have been caused by
> > something
> > > > wrong in the software.
> > > > [1cd8b80a4379c26549677281] 2020-07-13 17:30:10: Fatal erreur of type
> > > > "DBQueryError"
> > > > »
> > > >
> > > > Is there any procedure to follow to restore a wiki installation from a
> > > > database backup?
> > > > Or is it likely to be caused by a corruption in my database backup?
> > > >
> > > > I precise that I almost eliminated the hypothesis of an error in the
> > > > user's permissions on this database.
> > > >
> > > > Thanks in advance for any answer
> > > >
> > > > Regards
> > > >
> > > > Pascal GRÉGIS
> > > >
> > > >
> > > > _______________________________________________
> > > > MediaWiki-l mailing list
> > > > To unsubscribe, go to:
> > > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> > > >
> > > _______________________________________________
> > > MediaWiki-l mailing list
> > > To unsubscribe, go to:
> > > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > To unsubscribe, go to:
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l