On 2/12/15, Mayank Kumar (mayankum) <mayan...@cisco.com> wrote: > Hi All > > We have two systems which are running in active/standby configuration. The > active machine, is actively writing sqlite transactions to a file abcd.db. > The standby is syncing the abcd.db file from the active machine on a > communication channel and writing the delta records to the abcd.db on the > standby machine. > > Now my question is , lets say the active machine crashes in the middle of > the transaction and we have a hot journal created on the active machine. > Does it make sense to copy the hot journal to the standby machine, so that > the sqlite application on the standby will notice this hot journal and use > it to recover any lost transactions
Not only does it make sense - it is mandatory if you want to preserve the integrity of the database file. While a transaction is underway, the journal (either the *-journal file or the *-wal file) is part of the state of the database. If you fail to copy it over to another machine and then try to open that database on the other machine, the database will be incomplete and potentially corrupt. The journal files have a well-defined and documented format. They are independent of the byte-order and word-size of the machine they were created on. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users