Re: [sqlite] Unclear about some shell command differences

2019-05-24 Thread Richard Hipp
On 5/24/19, Tony Papadimitriou  wrote:
> Can someone explain the behavioral differences of the following shell
> commands?
>
> .backup ?DB? FILEBackup DB (default "main") to FILE
> .clone NEWDB Clone data into NEWDB from the existing database
> .save FILE   Write in-memory database into FILE

.backup and .save are aliases for the same command.

.clone attempts to move as much information as possible from the main
database file into a new database file, even if the main database file
is corrupt.  The ".clone" command was originally called ".repair".  I
do not recall why we created that command.

There will be a new ".recover" command in the next release (currently
available in the prerelease snapshot) which does a better job of
recovering content from a corrupt database file.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Unclear about some shell command differences

2019-05-24 Thread Tony Papadimitriou
Can someone explain the behavioral differences of the following shell commands?

.backup ?DB? FILEBackup DB (default "main") to FILE
.clone NEWDB Clone data into NEWDB from the existing database
.save FILE   Write in-memory database into FILE

They all seem to create a new db from the db currently active.
(.backup can optionally copy an attached db but in the default case, is it 
different?)

Thank you.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users