4 ms·
SQLite continues to be a great lightweight DB solution with so many great features. I love that for smaller projects (those that might have a few hundred or th
by nooyurrsdey 6y ago
SQLite continues to be a great lightweight DB solution with so many great features.
I love that for smaller projects (those that might have a few hundred or thousand rows in a DB at most) I can have everything self-contained in a single SQLite file.
* Backing up the DB is trivial - it's just backing up the file
* Establishing a connection is super quick
* No need to worry about Docker images or installation issues for psql, mysql, etc...
* A whole host of features like zipping, dumping, etc... make it really easy to use
Great work to the entire community maintaining this.
- CaliforniaKarl 6y agoI was wondering about backups! I thought, if doing a simple `cp`, you'd also have to make sure any remaining journal or WAL files are also copied. But now as I'm looking through SQLite docs, I found VACUUM INTO (https://www.sqlite.org/lang_vacuum.html#vacuuminto https://www.sqlite.org/lang_vacuum.html#vacuuminto), which lets you do a backup of an in-use database, combined with a VACUUM on the new database file!
- nathell 6y agoThere also is a backup API: https://www.sqlite.org/backup.html https://www.sqlite.org/backup.html
- otherme123 6y agoI use something like: $ sqlite3 filename.sql ".backup backupFilename_YYYYMMDD.sql" But VACUUM INTO looks better.
- schwartzworld 6y agoWhy only a few thousand rows? Pretty sure sqlite can handle 2^64 rows per table