2台目のMacbookを購入したときにこの問題が発生しました。iCloudを使用して2つを同期するのは簡単だと思いました。残念ながら、これは多くの人々によって報告されているように非常に信頼できないプロセスです。私はそれを扱うためにbashシェルスクリプトを書くことにしました。それは完全に動作します。Finderに表示されるバックアップ/復元ファイルをダブルクリックできます。私はDropboxにバックアップしましたが、スクリプトを変更して別の場所で書き込み/読み取りを行うことができます。ここにスクリプトをアップロードする方法がわからないので、テキストとして以下に含めます。スクリプトにはたくさんのコメントがあるので、プロセスを理解できるはずです。メインスクリプトは、Notesアプリディレクトリ全体をバックアップします。また、バックアップを他の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