[MediaWiki-l] Backup Syntax

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Backup Syntax

Steve VanSlyck-2
Hi guys,


I don't see anything wrong with this syntax:

mysqldump --user=LoginName --password=MyPassword my_wiki --xml > file.xml

But I am getting a complaint, "#1064 - You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near 'mysqldump --user=LoginName
--password=MyPassword my_wiki' at line 1"

The example given was mysqldump --user=wikidb_user
--password=wikidb_userpassword wikidb --xml > file.xml

And I replaced wikidb_user with LoginName (which is the name as viewed
in phpmyadmin password with the password I use to log in to the wiki,
i.e. MyPassword) and wikidp with the database name as displayed by
phpmyadmint as the table name wright below the information_schema table.
( also tried using the Wiki's name, but received the same failure for
bad syntax.)

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Backup Syntax

Jeremy Baron
On Apr 11, 2015 11:26, "Steve VanSlyck" <[hidden email]> wrote:
> I don't see anything wrong with this syntax:
> But I am getting a complaint, "#1064 - You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near 'mysqldump --user=LoginName
--password=MyPassword my_wiki' at line 1"
>
> The example given was mysqldump --user=wikidb_user
--password=wikidb_userpassword wikidb --xml > file.xml

given where?

2 problems:
* you're executing that at a mysql prompt not a shell prompt. (mysqldump is
its own separate program)
* you should leave off the --xml and dump as SQL

-Jeremy
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Backup Syntax

Steve VanSlyck-2
Thanks, I'll go to a shell prompt and do it right.

The reason I added for XML is that the backup manual
<https://www.mediawiki.org/wiki/Manual:Upgrading#Back_up_existing_files_and_the_database>
says to take an xml backup too. The sql backup was taken by someone
else, thru php, and I don't know if the settings he selected will allow
a restore.


On 4/11/2015 11:31 AM, Jeremy Baron wrote:

> On Apr 11, 2015 11:26, "Steve VanSlyck" <[hidden email]> wrote:
>> I don't see anything wrong with this syntax:
>> But I am getting a complaint, "#1064 - You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for
> the right syntax to use near 'mysqldump --user=LoginName
> --password=MyPassword my_wiki' at line 1"
>> The example given was mysqldump --user=wikidb_user
> --password=wikidb_userpassword wikidb --xml > file.xml
>
> given where?
>
> 2 problems:
> * you're executing that at a mysql prompt not a shell prompt. (mysqldump is
> its own separate program)
> * you should leave off the --xml and dump as SQL
>
> -Jeremy
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Backup Syntax

Nicolas Brouard (INED)
Yes keeping the xml as a backup is important too. I remarked that when restored the path of the images may differ, that is the reason why it is more important to backup the sql.
Nicolas

> Le 11 avr. 2015 à 17:35, Steve VanSlyck <[hidden email]> a écrit :
>
> Thanks, I'll go to a shell prompt and do it right.
>
> The reason I added for XML is that the backup manual <https://www.mediawiki.org/wiki/Manual:Upgrading#Back_up_existing_files_and_the_database> says to take an xml backup too. The sql backup was taken by someone else, thru php, and I don't know if the settings he selected will allow a restore.
>
>
> On 4/11/2015 11:31 AM, Jeremy Baron wrote:
>> On Apr 11, 2015 11:26, "Steve VanSlyck" <[hidden email]> wrote:
>>> I don't see anything wrong with this syntax:
>>> But I am getting a complaint, "#1064 - You have an error in your SQL
>> syntax; check the manual that corresponds to your MySQL server version for
>> the right syntax to use near 'mysqldump --user=LoginName
>> --password=MyPassword my_wiki' at line 1"
>>> The example given was mysqldump --user=wikidb_user
>> --password=wikidb_userpassword wikidb --xml > file.xml
>>
>> given where?
>>
>> 2 problems:
>> * you're executing that at a mysql prompt not a shell prompt. (mysqldump is
>> its own separate program)
>> * you should leave off the --xml and dump as SQL
>>
>> -Jeremy
>> _______________________________________________
>> 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