Name

.restore — Perform a low-level copy of a database file to a database

Common Usage

.restore [database_name] filename

Description

The .restore command performs a low-level copy of a database file into an open or attached database. If the database name is not provided, the main database will be populated. This command is frequently used to populate an active in-memory database from a database file. This command is safe to run against an active source database (although it may not succeed).

This is the opposite of the .backup command.

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.