Write a fresh copy of the database to a new file.
Section: Backup and maintenance
Create a compact backup with VACUUM INTO
sql
sql
VACUUM INTO 'backup-2026-03-28.db';Explanation
Produces a compact copy and is a strong option for backup-style snapshots.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Backup and maintenance