I was making extensive use of Notes on a loaner laptop for work. I just got my permanent machine, and after updating from the backed up data on CrashPlan, I found my notes didn't make it over. I looked into the issue, saw what I needed to copy over, and asked the build tech to email me the contents of group.com.apple.notes from the old machine. I extracted the zip he sent me, and in Notes ran "import notes" on the directory he sent. It doesn't seem like anything was copied over. Any idea why this might not work? Am I copying the wrong directory, or importing incorrectly or otherwise missing a step? What are the actual files that need to be copied over? Both old machine and new are running El Capitan.
4 Answers
The ‘Import to Notes’ function imports text files. Notes itself stores its files in a SQLite database, which is contained within the group.com.apple.notes group container.
~/Library/Group Containers/group.com.apple.notes/
To use this as your Notes database, quit Notes and copy the contents to the group container on your current system.
-
1Thanks for this!! Works! If it fits to your setup, you can connect the mac on the same local network, then open
preferences -> sharing
enable sharing, you are instantly able to see that in your other macs sidebar as a new client on the network, then you can connect to that machine with your same user, and drag it right over to your local, choosing replace. Close and re-open. Thanks again!– blambOct 16, 2018 at 19:17 -
This worked great on High Sierra - thanks! Leave it to Apple to have such an intuitive process here...– Jordan PJan 24, 2019 at 17:08
-
1I had to enable
System Preferences > Security & Privacy > Privacy > Full Disk Access
foriTerm 2
so that I was able to list and zip the contents of the~/Library/Group Containers/group.com.apple.notes/
directory Sep 30, 2021 at 12:22
I would check the contents of the zip files he sent you. As @grg said you can only import text files. There is a 3rd part app called Note2Txt.app that will write all your notes as text files in a folder you choose. You could copy the folder to the new computer and import the folder into Notes. Now if you look in "Imported Notes" you'll see all your previous notes.
I had this issue when I bought a second Macbook. I thought it would be simple to use iCloud to sync the two. Unfortunately this is a very unreliable process as reported by many people. I decided to write a bash shell script to deal with it. It works perfectly. You can double click on the backup/restore files seen in Finder. I backed up to Dropbox but you can modify the scripts to write/read to someplace different. I can't figure out how to upload the scripts here so will just include them below as text. There are plenty of comments in the script so you should be able to work out the process. The main script will back up the whole of the Notes app directories. It will also create a suitable restore script to restore the backups to any other Mac.
#!/bin/bash
#set -x
DT=`date "+%y%b%d"`
SAV_DIR=~/Dropbox/Notes
NOTE_DIR=~/Library/Group*/group.com.apple.notes*
TARFILE=Notes.$DT
RESTORE_FILE=notes_restore.$TARFILE.$HOSTNAME.sh
#echo DT=$DT
#echo SAV_DIR=$SAV_DIR
#echo TARFILE=$TARFILE
#echo RESTORE_FILE=$RESTORE_FILE
#ls -ld $NOTE_DIR
# Preserve ownership, permissions and full path to ensure files are
# restored to original locations
# ** You need to use tar xPpf to preserve full path and permissions on
# ** the restore command as well else the leading / will be removed and
# ** the files will be restored relative to where you run the command
tar cfpP /tmp/$TARFILE.$HOSTNAME.tar $NOTE_DIR
mv /tmp/$TARFILE.$HOSTNAME.tar $SAV_DIR
# ------------ Create Restore Script ----------------
# The restore script will have the same name, date and hostname
# as the notes tar file saved in the Dropbox folder
# The file can be seen in the Finder Dropbox window. A double click
# on it will run the restore script.
# This ensures that you can export the Notes app files to dropbox
# from any host and restore to any host by selecting the appropriate
# tar file restore script
echo "#! /bin/bash " > /tmp/$RESTORE_FILE
echo "cp $SAV_DIR/$TARFILE.$HOSTNAME.tar /tmp" >> /tmp/$RESTORE_FILE
echo "tar xPpf /tmp/$TARFILE.$HOSTNAME.tar" >> /tmp/$RESTORE_FILE
echo "/bin/rm /tmp/$TARFILE.$HOSTNAME.tar" >> /tmp/$RESTORE_FILE
chmod 755 /tmp/$RESTORE_FILE
mv /tmp/$RESTORE_FILE $SAV_DIR
-
1Welcome to Stack Exchange. Please take a look at the instructions for formatting posts with Markdown to understand why your code wasn't showing up properly.– NicMar 15, 2020 at 18:07
Just wanted to share: What if we need to transfer just a couple of Notes from 1 mac to another, but the target Mac already has existing Notes?
And you want to preserve style and text formatting, too?
TextEdit to the rescue!
- Copy-paste Note content to TextEdit. (This preserves formatting)
- Send TextEdit file via e-mail or Slack to yourself (or Air drop).
- Open the TextEdit file in the 2nd Mac, and copy-paste to Notes.