Android create backup database inside app : I have an app similar to contacts app and uses the sqlite to store data. I want that whenever the database version is changed,a backup of current database is taken inside the app and the  customer has option to fall back to previous version.

In onUpgrade() method,if i create a new table with different name, then i am unable to copy the data from older version.

Please suggest some good way to implement this. I have searched on internet, but was unable to find.