Hi all guys,
very nice work on Sqlcipher.
I would ask you how backup works in new versions on sqlcipher (tested on 4.4.2 and 4.4.3, on Debian 10 arm, Windows 10 and Ubuntu 18.04 x64, using openssl1-1-1d).
With version 3.20.1, the command used to perform a backup was:
./sqlcipher " {databasePath} " +
"\"PRAGMA KEY = '{databaseKey}'\" "+
"\".backup {backupTempPath}\" " +
"\"ATTACH DATABASE '{backupPath}' AS encrypted KEY '{databaseKey}'\" " +
"\"SELECT sqlcipher_export('encrypted')\" " +
"\"DETACH DATABASE encrypted\""
and works fine.
With the latest two versions, the result is always : Error: backup is not supported with encrypted databases.
The only way to perform a “backup” is to run this command:
./sqlcipher" {databasePath} " +
"\"PRAGMA KEY = '{databaseKey}';\" " +
"\"PRAGMA cipher_compatibility = 3;\" " +
"\"ATTACH DATABASE '{backupPath}' AS encrypted KEY '{databaseKey}';\" " +
"\"PRAGMA encrypted.cipher_compatibility = 3;\" " +
"\"PRAGMA encrypted.auto_vacuum=FULL;\" " +
"\"PRAGMA encrypted.journal_mode=WAL;\" " +
"\"SELECT sqlcipher_export('encrypted');\" " +
"\"DETACH DATABASE encrypted;\"";
Am i missing something? Is intended to not use the .backup API?
I thank you in advance for any reply and send you my best regards.