Skip to content
September 28, 2011 / amsanjeev

An Introduction to Backup Manager


Most of the application that are installed on current android devices have a good amount of data associated with it. Whenever someone migrates from one device to another, they end up having to transfer all their data across to the new device. For a non technical person this can be a pretty tricky and frustrating, not to mention time consuming thing to do. What if the app would some how automatically transfer all the data across to the new device without the user needing to do anything. Thats exactly what backup manager allows to do .

What is Backup Manager?

BackUp Manager is a component introduced in Android 2.2 to allow applications to backup persistent data to a Cloud Backup Service. The Backup Manager handles all your data transactions with the cloud storage using the backup transport. The developer will have to create a backup agent that handles all the data transactions on the device.

Why we need it ?

The idea is to provide one single component to all the applications to provide data back up feature instead of  making every app have their own data backup component and logic behind it. Having a centralized component for this makes it easy to not only schedule back ups from an operating system perspective but offloads from the developer to need to develop a back up service per application.

Workflow

Android Backup service

Android Backup Service

  1. Application would call the Custom Backup Agent class which is extended from BackupAgent or BackupAgentHelper class provided by android.
  2. Backup agent is responsible for all the data transactions on the device . It communicates with the available backup transport.
  3. Backup Transport would schedule the backup accordingly and handle all the data communication with the cloud service.

Advantages

  1. Better end user experience while migrating from one device to another. eg) user preference files
  2. Offload backup responsibility to the OS .
  3. Unified mechanism to communicate to google backup cloud service for all applications on the device .
  4. Can have logical restore points for application data.
  5. Less error prone to implement.

Things to keep in mind

The Backup manager uses the backup transport to send/receive the data form the cloud back up service.Backup transport is a client side component provided by android framework. Device manufactures are free to have have their implementation of the backup transport that talks to a custom cloud service. It is transparent to the application which backup transport is being used.

Since different devices can have different backup transports and cloud service for backup security is a concern and it is advised not to back up any sensitive information using this service.

Backup service is not guaranteed to be available in all android devices. So do not tie your application logic to  If it is not available the application will continue to perform the same way except for the fact that there will not be any backups created.

This mechanism is not designed to put and retrieve data on demand and hence should not be used for syncing application data. For syncing data we should use Android Data Sync service which I’ll explain in another post.

Advertisements

One Comment

Leave a Comment
  1. Subs / Sep 28 2011 8:28 pm

    New Google Drive Dropbox http://goo.gl/Isfdt may be helpful for backup manager right?? One gmail ID+One Android mobile+One cloud drive with backup!! Every thing with one email ID !!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: