Home | History | Annotate | Download | only in data
      1 page.title=Backing up App Data to the Cloud
      2 page.tags=cloud,sync,backup
      3 
      4 startpage=true
      5 
      6 @jd:body
      7 
      8 <p>Users often invest significant time and effort creating data and setting
      9 preferences within apps. Preserving that data for users if they replace a broken
     10 device or upgrade to a new one is an important part of ensuring a great user
     11 experience. This section covers techniques for backing up data to the cloud so
     12 that users can restore their data.
     13 
     14 <p>Android provides two ways for apps to backup their data to the cloud:
     15 <a href="{@docRoot}guide/topics/data/autobackup.html">Auto Backup for Apps</a> and
     16 <a href="{@docRoot}guide/topics/data/keyvaluebackup.html">Key/Value Backup</a>.
     17 Auto Backup, which is available starting API 23, preserves app data by uploading
     18 it to the users Google Drive account. The Key/Value Backup feature (formerly
     19 known as the Backup API and the Android Backup Service) preserves app data by
     20 uploading it to the <a href="{@docRoot}google/backup/index.html">Android Backup Service</a>.
     21 
     22 <p>Generally, we recommend Auto Backup because it requires no work to implement.
     23 Apps that target Android 6.0 (API level 23) or higher are automatically enabled
     24 for Auto Backup. The Auto Backup feature does have some limitations in terms of
     25 what data it can backup and it's availability on Android 6.0 and higher devices.
     26 Consider using the Key/Value Backup feature if you have more specific needs for
     27 backing up your app data. For more information, see <a href="{@docRoot}guide/topics/data/keyvaluebackup.html#Comparison">Comparison of Key/Value and Auto Backup</a></p>
     28 
     29 <p class="note"><strong>Note:</strong> These data backup features are not designed for synchronizing app data with other clients or
     30 saving data that you'd like to access during the normal application lifecycle.
     31 You cannot read or write backup data on demand. For synchronizing app data, see
     32 <a href="{@docRoot}training/sync-adapters/index.html">Transferring
     33 Data Using Sync Adapters</a> or <a href="https://developers.google.com/drive/android/">Google Drive Android
     34 API</a>.