python: Session from mysql save as xml?

Plutocrat plutocrat at gmail.com
Tue May 10 22:23:26 EDT 2016


Chris Stoughton wrote on Tuesday, 10 May, 2016 08:04 PM:
> Sorry that the question was not clear.  The source in this example is in a
> mysql database.

Seemed clear you were trying to backup from mysql to XML. I guess the return question was why would you want to do that? Its simple to backup from mysql into an sql text file, which has the advantage that it can easily be restored to the database. eg. 
To dump 
	mysqldump -u username -p databasename > dump.sql
To import
	mysql -u username -p databasename < dump.sql

You can of course optionally add the date to the filename and/or compress the file with the same commandline. 

I imagine exporting to XML would mean that it was trickier to get it back into the mysql database. But perhaps there was some reason why you wanted it in XML format?

P. 



More information about the gnucash-user mailing list