Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26041 > unrolled thread
| Started by | andrea crotti <andrea.crotti.0@gmail.com> |
|---|---|
| First post | 2012-07-25 14:56 +0100 |
| Last post | 2012-08-30 20:22 -0600 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Dumping all the sql statements as backup andrea crotti <andrea.crotti.0@gmail.com> - 2012-07-25 14:56 +0100
Re: Dumping all the sql statements as backup Robert Miles <robertmiles@teranews.com> - 2012-08-30 00:58 -0500
Re: Dumping all the sql statements as backup Jason Friedman <jason@powerpull.net> - 2012-08-30 20:22 -0600
| From | andrea crotti <andrea.crotti.0@gmail.com> |
|---|---|
| Date | 2012-07-25 14:56 +0100 |
| Subject | Dumping all the sql statements as backup |
| Message-ID | <mailman.2572.1343224604.4697.python-list@python.org> |
I have some long running processes that do very long simulations which
at the end need to write things on a database.
At the moment sometimes there are network problems and we end up with
half the data on the database.
The half-data problem is probably solved easily with sessions and
sqlalchemy (a db-transaction), but still we would like to be able to
keep a backup SQL file in case something goes badly wrong and we want to
re-run it manually..
This might also be useful if we have to rollback the db for some reasons
to a previous day and we don't want to re-run the simulations..
Anyone did something similar?
It would be nice to do something like:
with CachedDatabase('backup.sql'):
# do all your things
[toc] | [next] | [standalone]
| From | Robert Miles <robertmiles@teranews.com> |
|---|---|
| Date | 2012-08-30 00:58 -0500 |
| Message-ID | <kiD%r.12$tL7.10@newsfe19.iad> |
| In reply to | #26041 |
On 7/25/2012 8:56 AM, andrea crotti wrote:
> I have some long running processes that do very long simulations which
> at the end need to write things on a database.
>
> At the moment sometimes there are network problems and we end up with
> half the data on the database.
>
> The half-data problem is probably solved easily with sessions and
> sqlalchemy (a db-transaction), but still we would like to be able to
> keep a backup SQL file in case something goes badly wrong and we want to
> re-run it manually..
>
> This might also be useful if we have to rollback the db for some reasons
> to a previous day and we don't want to re-run the simulations..
>
> Anyone did something similar?
> It would be nice to do something like:
>
> with CachedDatabase('backup.sql'):
> # do all your things
I'm now starting to do something similar, but in C, not Python.
Apparently not using SQL.
The simulations this is for often last a month or more.
[toc] | [prev] | [next] | [standalone]
| From | Jason Friedman <jason@powerpull.net> |
|---|---|
| Date | 2012-08-30 20:22 -0600 |
| Message-ID | <mailman.3998.1346379766.4697.python-list@python.org> |
| In reply to | #28091 |
>> I have some long running processes that do very long simulations which
>> at the end need to write things on a database.
>>
>> At the moment sometimes there are network problems and we end up with
>> half the data on the database.
>>
>> The half-data problem is probably solved easily with sessions and
>> sqlalchemy (a db-transaction), but still we would like to be able to
>> keep a backup SQL file in case something goes badly wrong and we want to
>> re-run it manually..
>>
>> This might also be useful if we have to rollback the db for some reasons
>> to a previous day and we don't want to re-run the simulations..
>>
>> Anyone did something similar?
>> It would be nice to do something like:
>>
>> with CachedDatabase('backup.sql'):
>> # do all your things
>
" ... at the end need to write things on a database ... "
Is it necessary to write those things during the process, or only at
the end? If only at the end, can you write locally first, and then
write that local store to your remote database?
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web