Я пытаюсь реализовать простой SQLite
экспорт/импорт для целей резервного копирования. Экспорт - это только вопрос сохранения копии исходного файла current.db
. Для импорта я хочу просто удалить старый файл current.db
и переименовать файл imported.db
в current.db
. Это возможно? Когда я попробую это решение, я получаю следующую ошибку:
06-30 13:33:38.831: ERROR/SQLiteOpenHelper(23570):
android.database.sqlite.SQLiteDatabaseCorruptException: error code 11: database disk image is malformed
Если я посмотрю на необработанный файл базы данных в браузере SQLite
, он выглядит нормально.