The only documentation I've been able to find about .backup
and .dump
is the one shown by .help
:
.backup ?DB? FILE Backup DB (default "main") to FILE
.dump ?TABLE? ... Dump the database in an SQL text format
If TABLE specified, only dump tables matching
LIKE pattern TABLE.
The big question is: do both these commands lock the database before copying/dumping? Is the backup consistent?
This answer has some information on .backup
, but is there any authoritative documentation for that? (And what about .dump
?) The only thing I've been able to find in the SQLite's documentation is the "Online Backup API", but I'm not interested in an API, I just want to backup the database.