My recommendation is to dump the SQLite database into a corresponding .sql file, and then compress that ASCII file using your favorite compressor (ZIP, RAR, etc.)

In my view, this method has two advantages over copying the actual binary file for backup purposes, but no obvious disadvantages.

1. Compression ratio is always (at least with my own tests) significantly better on the ASCII .sql file than the SQLite binary equivalent. So, you need less storage for your backups, or less bandwidth for transmitting the database. 2. In case future versions of SQLite use a different incompatible format, your backups from long-long ago will still be able to rebuild the database using the current version of SQLite. Even in the unlikely event, some source level incompatibilities appear, you can easily edit those in the ASCII text file using a plain text editor, whereas the trying to convert the binary to a compatible format is not necessarily a trivial job, assuming you no longer have access to the needed version of SQLite.

-----Original Message----- From: Levente Kovacs
Sent: Saturday, August 09, 2014 2:18 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] archive of database

Dear List,


Is it a recommended method to archive or copy a database just copying the
sqlite file, or should I make a dump of the database, and move the SQL
statements?

I mean... is SQLite designed to support the move of the sqlite file? What if
a new version of the library comes out? Will it be able to read older
version of database?

What is the most portable way?

Thanks,
Levente

--
Levente Kovacs
CTO, CSO
http://levente.logonex.eu



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to