DuckDB_Connection.write_database
write_databasepathschema_onlyon_existing_file
Documentation
Writes the current database to a new database file to the specified path and then returns a new connection to the written database.
Arguments
path: The path to write the database to.schema_only: If set toTrue, only the schema will be written, without any data. Defaults toFalse.on_existing_file: The behavior to use if the file already exists. Defaults toBackup, which will create a backup of the existing file.
Returns
A new DuckDB_Connection connected to the written database.