Database Corruption

Users have reported xDrip database corruption.
Open issue

The exact cause of this issue is unknown.


What happens if my database is corrupted?

If this occurs, you will lose all your old readings.
Your sensor may stop working until you address the issue.
There will be no way to recover the lost readings.


What should I do?

1- Enable “Missed reading alert” – This is disabled by default. Enabling it ensures you receive an alert if readings stop.

2- Set up automatic cloud uploads – You can use Nightscout or Tidepool for this.
This ensures your data is safe even if the xDrip database is corrupted.
Given the risk of losing your phone, this is strongly recommended regardless of database issues.

3- Configure Glucose Retention – After all data has been uploaded to Nightscout, set Glucose retention to a value other than 0 so the database is automatically pruned.
A reasonable value could be 365, which deletes data older than one year.

4- Optional: Enable daily automatic Google Drive backups – Google Drive Backup
This option creates daily backups of your database and all settings to Google Drive automatically.

5- Optional: Enable daily automatic local backups on the phone – Daily legacy database backup
This option creates daily backups of your database on your phone.
Be aware that over time, these backups can fill up your phone’s storage. You can manually delete older files to free up space.