-1

I'm developing an application which will do the backup of Application's database to the Google servers and restore the data after reinstalling the application.

I didn't find any reference to do this task. I also tried the application given in Android SDK, which is working only with the Shell commands, but not by running the application.

Could anybody is having an idea how to do the backup and restore of the Application's database data?

Royston Pinto
  • 6,681
  • 2
  • 28
  • 46
M Vignesh
  • 1,586
  • 2
  • 18
  • 55

2 Answers2

1

Android has a "backup data" service that can help you in this particular case. You can find documentation here. I think it can solve your problem, but I didn't use it, so I can't describe the process.

You have also a good question in StackOverflow about backup/restore an SQLite internal DB. Just have a look at this link.

Community
  • 1
  • 1
eternay
  • 3,754
  • 2
  • 29
  • 27
  • I have referred those links... But in http://stackoverflow.com/questions/5282936/android-backup-restore-how-to-backup-an-internal-database link i did nt get the solution to implement,,,, – M Vignesh Oct 05 '12 at 10:43
0

SQLite's backup API works only where the backup is another file that can be accessed directly (for example, if you want to create a backup on the SD card), so it cannot be used when the backup goes "into the cloud".

Ensure that there is no active transaction, then backup the database file just as you would backup any other file.

CL.
  • 173,858
  • 17
  • 217
  • 259