Create a backup of Apple Reminders and Notes

If, like me, you’ve outsourced half your brain to Apple’s “Reminders” and “Notes” apps, you may have already thought that this data is very valuable and important and that an accident – be it a human error or a force of nature – could happen to Apple. In the worst case scenario, the data would be gone – and then what?

Unfortunately, neither app offers an export or backup function, just like the iCloud itself. The “Request a copy of my data” function does exist, but it is not really suitable for a regular backup – after all, it takes 4 to 5 working days before the requested data can be downloaded. In my own experience, the downloaded data does not always contain the current memories (not even those at the time of the request).

Fortunately, there is my beloved “Shortcuts” program from Apple. It can also retrieve data from the “Reminders” and “Notes” apps. So I set about writing a backup script with it.

Backup Shortcut for Reminders

The shortcut has become quite long. You can download and install it here. It works without external services or programs and runs purely locally. I have also included comments so that you can see and understand the structure.
The core is to use a little trick to get the reminder search function to search for ALL reminders and output them. Each reminder is then transferred to a so-called dictionary with which you can continue to work flexibly.

The result of the short command is a JSON file which contains ALL reminders (including the completed ones). It also contains all images that are attached to any reminder. Here you could limit the amount of data if necessary by changing the filter in the first step Search reminders and, for example, outputting “only unfinished”. The images are assigned to the individual reminders via the file name, which is also stored in the JSON file.

What will get exported and what not?

Fortunately, most of the information from the reminders can be exported, but unfortunately a few are not supported by the “Shortcuts” app:

✅ Title
✅ Notes
✅ Priority
✅ Due date / time
✅Reminder location
✅ End date
✅URL
✅ Images
✅ Subtasks
✅ List name
✅ Is flagged
✅ Is completed
✅ Has alarm clock
✅ Tags
✅Creation date
✅ Date of last change

⛔️ Repetition
⛔️ Reminders when chatting with certain people (here the script simply hangs on 🤷🏻‍♂️)
⛔️ Summary of the lists in folders

Backup Shortcut for Notes

The backup script for Apple’s “Notes” app also works without external services or programs and runs purely locally. I have also included comments so that you can see and understand the structure. The script is much shorter than for the reminders, which is unfortunately simply because there are fewer options available via the “Shortcuts” app.
The core is again to use the search notes function with a little trick to search for ALL notes and output them. Each note is then transferred to a so-called dictionary with which you can continue to work flexibly.

The result of the script is a JSON file which contains ALL notes.

What will get exported and what not?

Unfortunately, the notes are not quite as green as the reminders; some data is not available via the “Shortcuts” app:

✅ Name (title)
✅ Summary
✅ Text
✅ Checklists
✅ Folder name
✅ Tags
✅ Creation date
✅ Date of last change

⛔️Anhänge / images
⛔️ Folder structure
⛔️ Text formatting (bold, italics, etc.)
⛔️ Encrypted notes

When and how to run?

My original plan was to run the shortcut on the Mac regularly. However, the “Shortcuts” app on the Mac still does not support automation. There are various ways to run a shortcut regularly on the Mac. On the one hand, you can start it via a cronjob – but here I had the problem that the shortcut asked for authorization to export the data each time it was executed. On the other hand, you can also solve this via the “Automator” app – but this solution, where you create an Automator script and execute it via a recurring calendar entry and user-defined reminder at certain times, seemed too ugly to me.

However, a great feature of the shortcuts is that most of them also run on other devices without any problems – they are even available there directly. So I now run the two backup shortcuts on my iPhone. In addition to fixed times, many other events are available as triggers via the “Automation” tab. I have decided to run the backups as soon as the iPhone is connected to a charger. This happens once a day (unfortunately that’s the way it is with the iPhone) and you don’t use up any battery life and are almost certainly near a WLAN.

Run backup on an event

Storage Location

When you execute the backup shortcut on the iPhone, you have the choice of saving the backup on your iPhone itself or on your iCloud Drive. Theoretically, there are also various third-party cloud services available that integrate into the “Files” app (e.g. Web.de Online Storage, Infomaniak KDrive, Synology Drive…) – unfortunately, none of them can be selected as a destination and I don’t know why (maybe you have an idea? Then please let me know in the comments!).
It would certainly make sense – assuming that Apple actually falls victim to a disaster – to store the backups OUTSIDE the iCloud and the iPhone. Of the two options available, however, the iPhone itself would probably be the best choice for backup storage – even if the iCloud is down, you should still be able to access your backups this way.
In my case, however, I opted for the iCloud Drive, but only because this in turn is regularly backed up via my Mac (but that’s another story).

Note on permission issues

If a shortcut wants to “share” many reminders / notes, this is initially blocked, which I think is a very sensible protective measure. If your backup only consists of a few objects, you will be asked the first time you run the shortcut whether you want to allow this “sharing” and can allow it on the spot (forever).
However, if there are really many objects (in my case over 400), the shortcut is stopped with an error message, e.g. “This action is trying to share 445 reminder objects. This is not allowed”. You must first allow the sharing of large amounts of data in the settings of the “Shortcuts” app.
On the Mac, this can be done via the menu bar “Shortcuts” -> “Settings” -> “Advanced” -> “Allow sharing of large amounts of data”.
On the iPhone / iPad, go to “System settings”, search for “Shortcuts” -> “Advanced” and select “Allow sharing of large amounts of data”.

Allow sharing large amout of data on mac
Allow sharing large amount of data on iOS

The data format

The resulting JSON data format of both backup scripts is a format defined by me. There is no way to import this data back into any app. But the main thing is that the data is stored somehow and somewhere other than in the iCloud. If Apple has a super disaster, I’ll know about it and write an import script.

Further explanations of the format are probably superfluous here as the fields in the JSON file are self-explanatory. Editors such as “Visual Studio Code” or “JSON Viewer” can be used to view the JSON file clearly. There are also many browser tools that display JSON clearly, but you should consider whether you want to upload your backup somewhere.

Conclusion

While Apple apps often initially seem very restrictive and limited in their choice of functions, a lot of additional functionality can also be achieved in this case by integrating them into the “Shortcuts” app.
Thanks for reading and feel free to leave feedback or questions in the comments!

Translated with DeepL.com (free version)

Jan

Dad, husband, web developer, hobbyist

0 thoughts on “Create a backup of Apple Reminders and Notes

Leave a Reply

Your email address will not be published. Required fields are marked *