On 2015-09-25 08:46 PM, Warren Young wrote: > On Sep 25, 2015, at 11:59 AM, Richard Hipp <drh at sqlite.org> wrote: >> On 9/25/15, Aaron Digulla <digulla at hepe.com> wrote: >>> I was wondering if it was possible to create the same database (= no binary >>> difference) twice with sqlite. >> It works fine to create identical database files when I try it: >> >> drh at bella:~/sqlite/bld$ ./sqlite3 db1 <x7.txt >> drh at bella:~/sqlite/bld$ ./sqlite3 db2 <x7.txt > That suggests a good test for Aaron, then: > > sqlite3 my.db .dump > dump.sql > sqlite3 a.db < dump.sql > sqlite3 b.db < dump.sql
Note that the above can only be expected to work if there are no inserts using formulas like Random() or Date-Time based functions relative to the current time etc. What I have done in the past is use the backup api to write out two copies of the DB, though this will only work if there are no other connections altering the database in between. HTH, Ryan