Supporting native backup facility of SQLite
Hi all, as I'm going to have a need to use the native `online backup API`__ provided by SQLite, I looked around for existing solutions and found `sqlitebck`__. I somewhat dislike the approach taken by that 3rd party module, and I wonder if the API should/could be exposed by the standard library sqlite module instead. Another option would be using ctypes, but as I never used it, I dunno how easy it is to maintain compatibility between different OSes... What do you think? Thanks&bye, lele. __ https://www.sqlite.org/backup.html __ https://github.com/husio/python-sqlite3-backup -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.
On 11 July 2016 at 10:51, Lele Gaifax <lele@metapensiero.it> wrote:
as I'm going to have a need to use the native `online backup API`__ provided by SQLite, I looked around for existing solutions and found `sqlitebck`__.
I somewhat dislike the approach taken by that 3rd party module, and I wonder if the API should/could be exposed by the standard library sqlite module instead.
Another option would be using ctypes, but as I never used it, I dunno how easy it is to maintain compatibility between different OSes...
There's also apsw (https://github.com/rogerbinns/apsw), which appears to support backup - http://rogerbinns.github.io/apsw/backup.html. Paul
Paul Moore <p.f.moore@gmail.com> writes:
There's also apsw (https://github.com/rogerbinns/apsw), which appears to support backup - http://rogerbinns.github.io/apsw/backup.html.
Thank you, will have a look: not sure it fits my need, because the application is currently based on Python's sqlite module (thru SQLAlchemy), and it seems I'd have to open another APSW connection just to make the backup... Original questions still hold, though. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.
On 11 July 2016 at 16:59, Lele Gaifax <lele@metapensiero.it> wrote:
Paul Moore <p.f.moore@gmail.com> writes:
There's also apsw (https://github.com/rogerbinns/apsw), which appears to support backup - http://rogerbinns.github.io/apsw/backup.html.
Thank you, will have a look: not sure it fits my need, because the application is currently based on Python's sqlite module (thru SQLAlchemy), and it seems I'd have to open another APSW connection just to make the backup...
Original questions still hold, though.
Indeed - I don't see any reason why exposing the backup API through the sdlib module would be unacceptable (there's plenty of sqlite-specific functionality in there already, it's not as if there's a need to limit the module to just the DB-API interface). If you were interested in doing that, I'd suggest opening a tracker issue with a patch. Paul
Paul Moore <p.f.moore@gmail.com> writes:
Original questions still hold, though.
Indeed - I don't see any reason why exposing the backup API through the sdlib module would be unacceptable (there's plenty of sqlite-specific functionality in there already, it's not as if there's a need to limit the module to just the DB-API interface). If you were interested in doing that, I'd suggest opening a tracker issue with a patch.
Excellent, will do that, thank you for the encouragement! ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.
Lele Gaifax <lele@metapensiero.it> writes:
Paul Moore <p.f.moore@gmail.com> writes:
If you were interested in doing that, I'd suggest opening a tracker issue with a patch.
Excellent, will do that, thank you for the encouragement!
See http://bugs.python.org/issue27645 Thank you in advance for any feedback! ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. lele@metapensiero.it | -- Fortunato Depero, 1929.
participants (2)
-
Lele Gaifax
-
Paul Moore