All notes thesteriously disappeared across all synced devices. Can I recover

data-recoverynotes.app

All of my notes that are synced through iCloud have just disappeared across all of my synced devices. I use this application every day and would really like to get these notes back, but I can't explain how they disappeared.

Here's what happened:

  1. I went to my notes app earlier today on my laptop
  2. The notes app took a while to sync with iCloud
  3. When it finished syncing, all my notes disappeared and there is no Recently Deleted section.
  4. I went to my iPhone and had the same behaviour.
  5. When I went to my iCloud account in my browser to check my notes, it was empty, too.
  6. I went to my old laptop, disconntected it from the internet and made a backup of all the files in ~/Library/Containers/com.apple.notes/Data/Library/Notes. This laptop has my notes up to early April of this year.
  7. When I reconnected the laptop to the internet, it synced as well, and I lost everything (thought I still have the backup).

Several questions:

  1. What could have happened here such that all notes were deleted?
  2. How can I prevent this from happening in the future?
  3. Is there any way of recovering these notes now? (For example, might they be in my iPhone backup?)

I do use Carbonite to back up my laptop files, but ~/Library/Containers/ is not one of the folders being backed up.

Best Answer

I have three questions here and I was able to figure out the two, with a guess for the first.

What could have happened here such that all notes were deleted?

I don't know exactly, but my guess is that the notes database was corrupted somehow. Most likely, the corruption happened on my phone (since I upgraded an OS patch two days ago). When my iPhone synced its corrupted database with iCloud, all notes there were deleted too. And then the corruption was passed on to my laptop. This is just a guess, though.

However, it seems like others have had this problem, too.

How can I prevent this from happening in the future?

The key thing to remember is that syncing is not a backup. If you sync corrupted or deleted data, then everything is corrupted or deleted. The most important thing to do is make sure you have backups of all your important data AND check to make sure that your backups are actually working properly.

In my case, the backup software on my laptop was not backing up anything in my ~/Library directory (which is where the notes archives are stored) unless I went in and changed some arcane settings. After this was done, I have this folder backing up.

I also installed Exporter from the app store which allows you to export your notes to text. This will be another stopgap for me if this ever happens again.

Is there any way of recovering these notes now? (For example, might they be in my iPhone backup?)

It turns out that yes, these notes were being backed up on my phone, but it was more complicated than just applying this backup to get the notes back. If I didn't do anything else, once the phone starts syncing with iCloud, all the backedup notes were immediately deleted because the synced notes on iCloud is "newer" (ie- the database corruption happened after the backup, so the corruption overwrote the notes).

What I needed to do was:

  1. reinstate the backup
  2. immediately put my phone into airplane mode so no syncing happened
  3. open the notes app
  4. move all notes to a non-synced folder outside of iCloud
  5. take phone out of airplane mode
  6. let the sync complete (ie- the local phone's synced folder and iCloud are now both without any notes, but the non-synced folder has all notes).
  7. Move the notes back to the iCloud folder.
  8. Allow sync to happen as normal.

This solved the problem.