Dong-hee Na <donghee...@python.org> added the comment:
I've done my PoC in my local environment. ``` import dbm.gnu as dbm db = dbm.open('x.db', 'nx') db.gdbm_failure_atomic('even_snapshot.bin', 'odd_snapshot.bin') for k, v in zip('abcdef', 'ghijkl'): db[k] = v db.sync() db.close() ``` By doing this in local fs both snapshot files are created and it can be used for recovery x.db file. gdbmtool> snapshot even_snapshot.bin odd_snapshot.bin GDBM_SNAPSHOT_OK: Selected the most recent snapshot. odd_snapshot.bin: 400 r-------- 1634377177.462498326 6 you can use odd_snapshot.bin as the last successful snapshot file. >>> import dbm.gnu as dbm >>> db = dbm.open('odd_snapshot.bin', 'r') >>> db.keys() [b'c', b'f', b'a', b'd', b'b', b'e'] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45452> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com