Android Question sqlcipher backup

surfuric

Member
Licensed User
Longtime User
What is the best way to backup/restore a database being used with sqlcipher?
 

surfuric

Member
Licensed User
Longtime User
This is what I thought.

But when I searched on the internet, many said that just copying can lead to corruption (they were not specific as to why). As long as I close the database before copying I should be alright, is this the case?
I use File.Copy for the copy, nothing else special.

Also, I do not seem to have a journal file in my directory, just a .db file. So I was worried that sqlcipher might have different requirements.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
is this the case?
Yes.

Also, I do not seem to have a journal file in my directory, just a .db file. So I was worried that sqlcipher might have different requirements.
There will only be additional files if the journal mode is wal. You can check it with a pragma query.
 
Upvote 0
Top