Re: Dumping all the sql statements as backup
2012/7/25 Jack <email@example.com
> Since you know the content of what the sql code is, why not just build
> the sql file(s) needed and store them so that in case of a burp you can
> just execute the code file. If you don't know the exact sql code, dump
> it to a file as the statements are constructed... The only problem you
> would run into in this scenario is duplicate data, which is also easily
> solvable by using transaction-level commits to the db.
Yes but how do I construct them with SqlAlchemy?
One possible option I found is to enable the logging of some parts of
SqlAlchemy, and use that log, (echo=True in create_engine does
something similar) but maybe there is a better option..
But I need to filter only the insert/update/delete probably..
And in general the processes have to run independently so in case of
database connection problems I would just let them retry until it
When the transaction actually works then in the backed up log I can
add a marker(or archive the log), to avoid replaying it.
|All times are GMT. The time now is 04:18 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.