When you're trying to backup the database using the "backup to " non standard command, the destination database is opened clear all the time. If the source is encrypted you might want to keep your backup encrypted or encrypt it with another cipher algorithm. The "backup to" command should provide a way to choose the algorithm parameters like when the user opens the database.
The same thing apply for the "restore from" command.
Possible workaround ( not tested ):
You can try putting cipher parameters after the name like when you're opening the database.
Ex:
Backup to file:dB.db?key=AA
Backup to dB.db?key=AA
If that doesn't work you can still cipher it after backup using the standard way:
open the new database clear ( do not specify the key at the end.
execute the "PRAGMA key='...'" SQL query to apply a key to the database.
close the database
After that it should be now encrypted.
If you want to restore the database, might need to rekey the backup before restore
open with ciphers parameters
execute PRAGMA rekey=''
close the database
do the restore
Rekeying the backup might be also needed since at this stage it is clear
When you're trying to backup the database using the "backup to " non standard command, the destination database is opened clear all the time. If the source is encrypted you might want to keep your backup encrypted or encrypt it with another cipher algorithm. The "backup to" command should provide a way to choose the algorithm parameters like when the user opens the database.
The same thing apply for the "restore from" command.
Possible workaround ( not tested ):
You can try putting cipher parameters after the name like when you're opening the database. Ex:
If that doesn't work you can still cipher it after backup using the standard way:
After that it should be now encrypted.
If you want to restore the database, might need to rekey the backup before restore
Rekeying the backup might be also needed since at this stage it is clear
Another workaround would be to: