Backup
1. What it does
Make sure to never lose your data with either local manual backup or automated cloud backup.
2. Where to find it
-
Left ≡ menu → Backup
-
Settings → Services → Cloud backup
3. Options
Exports all your sleep records, noises and preferences to ZIP files located on your phone at /sdcard/sleep-data/. Use for local backup or for your own analysis of sleep tracking data. The command also zips up the CSVs and offers to share.
Starts import of data from /sdcard/sleep-data/sleep-export.zip (local backup).
|
If you already have existing sleep records in Sleep, import will not overwrite them. It will just import new records that are present in the import file. |
Starts synchronization set in Settings → Services → Cloud backup and uploads data from phone to cloud.
Starts synchronization set in Settings → Services → Cloud backup and downloads data from cloud to app.
Starts synchronization with Google Fit service.
For more details, please read the Backup section of Privacy settings.
4. Local backup
Backs up: Sleep records, Settings, Noise recordings, Noise recordings metadata, Active alarms
Does not back up: Inactive alarms
Your data are being backed up on a daily basis to /sdcard/sleep-data/
folder on your phone. You can also start local backup manually using Left ☰ menu → Backup → Export data.
|
Do not use if you plan to reinstall the app, or to clear the app’s data! If you wish to use manual backup for these purposes, tap the SHARE button on the dialogue, and save the file to a different location, add it to an email, or save it to a cloud service. |
What is backed up in this folder:
Contains all your recorded noise files.
Noise metadata
Settings
Latest sleep data
Sleep data from the previous backup
all the above (except /rec folder) are zipped up here for easy sharing
You can also open the CSV file on your computer (e.g. in Excel) for your own analysis of the sleep tracking data. The structure of the CSV file is documented here.
The backup zip file can be used for migrating your Sleep settings and tracking history to a new phone - see our detailed guide.
5. Backup to SleepCloud (recommended)
Backs up: Sleep records, Settings, Active alarms, Noise recordings metadata
Does not back up: Noise recordings, Inactive alarms
Recommended backup service. It stores data in our own cloud designed for Sleep as Android. It has several unique features not present in other backup methods.
6. Backup to Dropbox or Google Drive
Backs up: Sleep records, Settings, Noise recordings metadata, Alarms
Does not back up: Noise recordings
To automatically backup your data to Dropbox or Google Drive:
. Install SleepCloud Backup add-on.
. Go to Sleep → Settings → Services → Cloud backup and connect either Google Drive or Dropbox.
-
Free SleepCloud service automatically initiates back up once a week.
-
The paid PRO version automatically initiates backup when some relevant change happens (a new graph was added, an old graph was edited, etc.). You can force backup using Left ≡ menu → Backup → Upload to Cloud.
-
The back up service will create a Sleep as Android folder within the Google Drive storage, and Sleep Cloud Backup folder within the DropBox service.
|
If the backup to a cloud service fails, you will see a notification in the notification center. If this happens, please contact support@urbandroid.org.![]() |
7. Backup using Google provided backup cloud
Backs up: Sleep records, Settings, Alarms, Noise recordings metadata
Does not back up: Noise recordings
Most Android phones support Google provided backup. This is an optional feature and it must be explicitly enabled by the user.
|
We recommend using other methods, preferably SleepCloud, to backup your sleep records, as we have no direct control over initiation of Google backup so it may not work in all cases. This method is NOT meant to be used for synchronization of data or settings across phones. |
-
Enable Backup to Google One in System Settings → System → Backup (might be hidden under Advanced options) → Back up by Google One - the system will backup to a Google cloud automatically in background, or you can force immediate back up with "Back up now" button.
-
In case you have developer tools available, you can force Google backup and restore to get reliable results. To force the backup, you can run “adb backup -f sleep-backup.bk com.urbandroid.sleep” when the old device is connected and to upload the backup to a new device run “adb restore sleep-backup.bk”.
8. Import data from email, Google Drive, Dropbox
If you tap on the CSV or ZIP file that was exported from Sleep (anywhere - in your email attachment, Drive, Dropbox, file manager), the system will offer to open it with Sleep as Android. This will import the included sleep records.
FAQ
-
Most probably your Backup alarm went off after regular alarm did not wake you up. Backup alarm is triggered when there is no interaction (no snooze, no dismiss) for more than 20 minutes.
-
Make sure you are using volume strong enough in Settings → Alarms → Ringtone, or enable Gentle Volume increase in Settings → Alarms → Gentle volume increase
-
Try vibrations (Settings → Alarms → Vibrate).
Send us your log using Left ☰ menu → Support →
Report a bug.
There are five possible ways to transfer your data to a new devices:
1. Google backup
Normally we use Google’s backup function, if enabled in System settings → Privacy.
After installing Sleep as Android on the new device, you will get all your settings, alarms and other data. This assumes you install with a fast network connection enabled.
2. Import / export in the app - manually
You an also do a manual export/import process:
-
Go to the Left ☰ menu →
Backup → Export, and make sure the dialog says "successful".
-
Copy the directory /sdcard/sleep-data to your new phone’s SD card.
-
Install Sleep as Android on the new phone and immediately go to Left ☰ menu →
Backup → Import.
If you don’t import immediately, the app will replace your sleep-export.zip
file after the next sleep record is created. The oldsleep-export.zip
file will be renamed tosleep-export.backup.zip
. See solution.
3. Import / export in the app - sending the backup file with email
For even easier migrating to a new phone, you can use your email.
-
Go to the Left ☰ menu →
Backup → Export.
-
When a dialogue "Successful backup to your local storage" appears, choose "Share" button.
-
Now, you can choose your email client, and the backup zip file is attached to the body of a new email.
-
Send it to yourself.
-
Open the email client on your new phone, open the email, and tap on the attachment.
-
You will be asked which data you wish to import - select all types of data you wish to import, and submit.
4. Import / export in the app - sharing the file with Google Drive
Another easy way of migrating to a new device is Google Drive sharing.
-
Got to the Left ☰ menu →
Backup → Export.
-
When a dialogue "Successful backup to your local storage" appears, choose "Share" button.
-
Choose Google Drive, and confirm.
-
Then open Google Drive on your other device, and select the backup file.
-
You will be asked which data you wish to import - select all types of data you wish to import, and submit.
5. Sleep Cloud
Third option is to use some of the Cloud Backup methods from the SleepCloud Add-on. Please, see more about Backup.
If you moved a sleep-export.zip
file to your new phone and did not import the file before the app created a new sleep record, the app has replaced your sleep-export.zip
. The old sleep-export.zip
file was renamed to sleep-export.backup.zip
.
To restore the old data:
-
Delete the
sleep-export.zip
file. -
Rename
sleep-export.backup.zip
tosleep-export.zip
.
In Sleep, do Left ☰ menu → Backup > Import data.