mercredi 4 mars 2015

ATTACH : Duplicate attached database content in current database

My java application use SQLite and need a backup/restore system. During the backup, the program create a file named "backup.ext", attach it and copy in this file our database content.


I would like to implement the restore command. With the ATTACH command, I can get the other db's content, the tables are prefixed by "backup". I want to duplicate this content in a schema prefixed by .backup in my main database. But It's not possible to use schemas with SQLite


Would you know a simple way to duplicate my file's content ? Do you know how to keep in my database the tables attached like "backup.table" when the other file is detached ?


Thank you for your help


Aucun commentaire:

Enregistrer un commentaire