3 ms·
I 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
by CaliforniaKarl 6y ago
I 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.