21

I'm using a company-issued MacBook where we cannot use iCloud to backup notes. But I would like to have a way to create backups of the notes, since they are not included in the company backup software. Is there a way to do this by hand?

I tried copying the folder:

$HOME/Library/Containers/com.apple.Notes

but when I copied that one to a new Mac, the notes didn't show up when running Notes.app.

Nimesh Neema
  • 48,747
  • 19
  • 143
  • 197
Harpe
  • 353
  • 1
  • 2
  • 7

4 Answers4

24

You may have copied the wrong directory, depending on your operating system.

Newer operating systems (I believe El Capitan and above, but certainly Sierra and above) use this folder:

~/Library/Group Containers/group.com.apple.notes/

Without iCloud there should be no issue with disappearing notes, which you would have to work around, if you were signed into iCloud Notes.

Redarm
  • 4,623
  • 3
  • 13
  • 31
  • @bmike what do you find in "group.com.apple.notes.import"? – Redarm May 17 '20 at 10:58
  • [It’s not common - we should have user84733](https://apple.stackexchange.com/a/391309/5472) weigh in – bmike May 17 '20 at 11:52
  • I'm sorry, I'm not following. What is not common? I am reluctant to accept your edit without an explanation of this folder's use. Here, if the folder exists at all, there is nothing contained, apart from some empty directories. – Redarm May 17 '20 at 13:56
  • Roll it back if you don't like it – bmike May 17 '20 at 21:17
  • @bmike OK, thanks. I was just hoping you'd know something I missed about that directory. – Redarm May 17 '20 at 21:33
  • it should be ~Library/Group\ Containers/group.com.apple.notes – DavidDunham Nov 20 '22 at 01:52
  • @DavidDunham No, it should not. Firstly you omitted a forwards slash between the tilde mark and Library: `~/Library`, secondly you are thinking of Terminal, but Finder's "Go" menu and "copy as pathname" contextual menu will prefer and display my version of the string, without backslash. – Redarm Nov 21 '22 at 10:00
  • Hence the wording should be: for the command line use `~/Library/Group\ Containers/group.com.apple.notes`, or `~"/Library/Group Containers/group.com.apple.notes"` – Redarm Nov 21 '22 at 10:09
4

I dragged both folders from user library unto a external drive to back them up: group.com.apple.notes and group.com.apple.notes.import from in the user library

You can create a test user using these folders into that user library and all will reappear (but not in another user) they are signed.

The reason I had to do this was to fix sync issues, so after I made a backup I went too the system prefs, Apple ID account, chose Manage (iCloud storage) and erased all the notes across all devices.

After dragging back the two folders into the user library everything went back to normal and started syncing again. It was the only way.

You also need a good wifi connection and internet plan for this if you have tons of gigs of notes with photos, videos etc, I have 82GB: Notes replaced the rest for me.

IconDaemon
  • 18,247
  • 10
  • 41
  • 57
user84733
  • 41
  • 1
1

Apple's official recommendation to backup notes is to save them in a text/document file or export as PDF. From the Apple support article, Archive or make copies of the information you store in iCloud - Notes and Voice Memos

Notes and Voice Memos

Make a copy of a note on your Mac or at iCloud.com:

  1. Open the Notes app and select the note that you want.

  2. Copy and paste the text into a document on your computer, such as a Pages or TextEdit document.

  3. Save the document to your computer.

You can also export a note. Just select the note, click File > Export as PDF, and choose a location.

The approach is a bit clumsy and doesn't let you backup all the various notes in one go.

Nimesh Neema
  • 48,747
  • 19
  • 143
  • 197
  • Thanks for the answer, but the problem with this approach is that you cannot restore the backups easily. I'm looking for a way to backup and restore notes, in case the original notes get lost. – Harpe Nov 20 '18 at 10:20
  • Alternatively, if there is another note taking app that allows easier local backups with restore, and where I can easily import my current notes including nested folders of notes, that would also be very helpful. – Harpe Nov 20 '18 at 10:21
  • @Harpe You can find a plethora of note taking apps which do not backup to iCloud. Try doing a Web search. – Nimesh Neema Nov 20 '18 at 10:22
  • Thanks I did, but I was hoping for a recommendation, especially wrt to importing existing notes. I'll add a comment if I find a good one. – Harpe Nov 20 '18 at 10:38
  • There is a 3rd party app named Note2txt which exports all your notes to a text file. Each note generates a separate file. i backup my notes by using this and exporting files to a folder with the date in the name. like notes_11202018 – Natsfan Nov 20 '18 at 14:31
  • I won't recommend software, but if you want to be able to make local backups, there's always Evernote. It may run afoul of your company's policies as well because of its on-line component, but the desktop client allows you to export (and restore) all content as a single backup file. – Marc Wilson Nov 22 '18 at 22:28
0

To make a simple backup use this in terminal.

zip -r notesbackup_yyyyMMdd.zip  
/Users/???/Library/Group\ Containers/group.com.apple.notes 
/Users/???/Library/Group\ Containers/group.com.apple.notes.import
DavidDunham
  • 101
  • 2