Skip to content

Most visited

Recently visited


Backing up App Data to the Cloud

Users often invest significant time and effort creating data and setting preferences within apps. Preserving that data for users if they replace a broken device or upgrade to a new one is an important part of ensuring a great user experience. This section covers techniques for backing up data to the cloud so that users can restore their data.

Android provides two ways for apps to backup their data to the cloud: Auto Backup for Apps and Key/Value Backup. Auto Backup, which is available starting API 23, preserves app data by uploading it to the user’s Google Drive account. The Key/Value Backup feature (formerly known as the Backup API and the Android Backup Service) preserves app data by uploading it to the Android Backup Service.

Generally, we recommend Auto Backup because it requires no work to implement. Apps that target Android 6.0 (API level 23) or higher are automatically enabled for Auto Backup. The Auto Backup feature does have some limitations in terms of what data it can backup and it's availability on Android 6.0 and higher devices. Consider using the Key/Value Backup feature if you have more specific needs for backing up your app data. For more information, see Comparison of Key/Value and Auto Backup

Note: These data backup features are not designed for synchronizing app data with other clients or saving data that you'd like to access during the normal application lifecycle. You cannot read or write backup data on demand. For synchronizing app data, see Transferring Data Using Sync Adapters or Google Drive Android API.

This site uses cookies to store your preferences for site-specific language and display options.


This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.