Skip to content

Database copies ​

VACUUM INTO writes a database copy to another path. Use it instead of copying only a database file that is actively in use.

Syntax ​

text
VACUUM INTO '/path/to/copy.db';

The destination must be absent or empty. Run the command outside an open transaction. The copy reads main, even when a schema qualifier is present.

Current limits ​

The source must use UTF-8 storage and must not contain WITHOUT ROWID user tables. Native values require CoordinatorDB when the copy is opened. Plain VACUUM performs no work.

Separate processes can use independent copies. They must not open the same database file simultaneously.

Procedure ​

See Local database copy for the steps to reopen a copy with separate listeners. BACKUP/RESTORE commands, scheduled backups and object-storage backup targets are not supported.